{
  "components": {
    "schemas": {
      "AccountChange": {
        "description": "What may change on an account. Its code and type do not: the code is\nhow reports group it, and the type is which side of the books it is on.",
        "properties": {
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "False takes it out of use: nothing new is filed or posted to it, and everything already posted stays and still reports. True brings it back.",
            "title": "Is Active"
          },
          "name": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the chart calls it.",
            "title": "Name"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Move it under this account, which is of its own type and still in use. Null moves it to the top of its type; leave the field out to leave it where it is. What is posted to it does not change: the subtotals above its old and new place do.",
            "title": "Parent Id"
          }
        },
        "title": "AccountChange",
        "type": "object"
      },
      "AccountChangeOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "description": "What this bill charges the account; 0 when it does not.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "change": {
            "description": "`amount` less `previous_amount`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Change",
            "type": "string"
          },
          "previous_amount": {
            "description": "What the last bill charged the account; 0 when it did not.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Previous Amount",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "previous_amount",
          "amount",
          "change"
        ],
        "title": "AccountChangeOut",
        "type": "object"
      },
      "AccountDetailOut": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/AccountOut"
          },
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "children": {
            "items": {
              "$ref": "#/components/schemas/AccountOut"
            },
            "title": "Children",
            "type": "array"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "parent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountRef"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "as_of",
          "currency",
          "account",
          "parent",
          "children"
        ],
        "title": "AccountDetailOut",
        "type": "object"
      },
      "AccountOut": {
        "properties": {
          "balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Balance",
            "type": "string"
          },
          "carries_financing": {
            "default": false,
            "description": "True when a financing instrument is carried in it (a SAFE's, a note's or venture debt's account), whatever its code: never a transfer's other end (decision 0191).",
            "title": "Carries Financing",
            "type": "boolean"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "control_role": {
            "anyOf": [
              {
                "enum": [
                  "ar",
                  "ap",
                  "processor_clearing"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`ar`, `ap` or `processor_clearing` on a control account, whose every line names its party (`party_id`).",
            "title": "Control Role"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "has_activity": {
            "default": false,
            "title": "Has Activity",
            "type": "boolean"
          },
          "id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_postable": {
            "title": "Is Postable",
            "type": "boolean"
          },
          "is_rollup": {
            "title": "Is Rollup",
            "type": "boolean"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The logo a person uploaded for the account, a square PNG; null for none. Shown instead of `provider`'s mark.",
            "title": "Logo Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The integration that feeds the account (`brex`, `mercury`, \u2026), when one does: the provider of a connected bank account, card or card program mapped to it. The account wears its mark unless a logo was uploaded.",
            "title": "Provider"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "type",
          "role",
          "parent_id",
          "is_postable",
          "is_active",
          "currency",
          "balance",
          "is_rollup"
        ],
        "title": "AccountOut",
        "type": "object"
      },
      "AccountReconciliationOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "covered_by_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Covered By Account Id"
          },
          "difference": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Difference"
          },
          "includes_descendants": {
            "default": false,
            "title": "Includes Descendants",
            "type": "boolean"
          },
          "is_balanced": {
            "title": "Is Balanced",
            "type": "boolean"
          },
          "ledger_balance": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ledger Balance"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "reconciled_through": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reconciled Through"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "statement_balance": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Statement Balance"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "role",
          "reconciled_through",
          "ledger_balance",
          "statement_balance",
          "difference",
          "is_balanced"
        ],
        "title": "AccountReconciliationOut",
        "type": "object"
      },
      "AccountRef": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "name"
        ],
        "title": "AccountRef",
        "type": "object"
      },
      "AccountReviewChanges": {
        "description": "Only the fields sent change. `support_balance` and `evidence` are\ncleared by sending null.",
        "properties": {
          "evidence": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the support is; null clears it.",
            "title": "Evidence"
          },
          "status": {
            "description": "`reviewed` to mark it reviewed, `open` to take that back.",
            "enum": [
              "open",
              "reviewed"
            ],
            "title": "Status",
            "type": "string"
          },
          "support_balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,21}0*$)\\d{0,16}\\.\\d{0,4}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the support says the account holds; null clears it.",
            "title": "Support Balance"
          }
        },
        "title": "AccountReviewChanges",
        "type": "object"
      },
      "AccountReviewOut": {
        "description": "One account, checked against its support for one month's close.",
        "properties": {
          "account_code": {
            "description": "The account's code in the chart.",
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "The account reviewed.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "description": "The account's name.",
            "title": "Account Name",
            "type": "string"
          },
          "close_run_id": {
            "description": "The close run it belongs to.",
            "examples": [
              "close_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Close Run Id",
            "type": "string",
            "x-id-prefix": "close_run"
          },
          "created_at": {
            "description": "When the review was first written.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "difference": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`gl_balance` less `support_balance`. Null without a support balance.",
            "title": "Difference"
          },
          "editable": {
            "description": "Whether its close is still open, so the review can change.",
            "title": "Editable",
            "type": "boolean"
          },
          "evidence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the support is, and what explains any difference.",
            "title": "Evidence"
          },
          "gl_balance": {
            "description": "The account's balance at the month's end, as the ledger said when the review was last written: positive in the direction the account normally grows.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Gl Balance",
            "type": "string"
          },
          "id": {
            "description": "The review's id.",
            "examples": [
              "gla_review_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "gla_review"
          },
          "period": {
            "description": "The month it reviews, like 2026-09.",
            "title": "Period",
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was marked reviewed.",
            "title": "Reviewed At"
          },
          "reviewed_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who marked it reviewed.",
            "title": "Reviewed By"
          },
          "reviewed_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their address, while they are a member of these books.",
            "title": "Reviewed By Email"
          },
          "status": {
            "description": "`open` while the support is still being gathered, `reviewed` once someone stands behind it. An open review holds the month's close.",
            "enum": [
              "open",
              "reviewed"
            ],
            "title": "Status",
            "type": "string"
          },
          "support_balance": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the support says the account holds: the aging, the payroll register, the lender's statement. Null until someone enters it.",
            "title": "Support Balance"
          },
          "through_sequence": {
            "description": "The posting sequence `gl_balance` reflects.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "updated_at": {
            "description": "When it last changed.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "period",
          "close_run_id",
          "account_id",
          "account_code",
          "account_name",
          "gl_balance",
          "through_sequence",
          "support_balance",
          "difference",
          "evidence",
          "status",
          "reviewed_by",
          "reviewed_by_email",
          "reviewed_at",
          "editable",
          "created_at",
          "updated_at"
        ],
        "title": "AccountReviewOut",
        "type": "object"
      },
      "AccountReviewPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AccountReviewOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "AccountReviewPage",
        "type": "object"
      },
      "AccountSuggestionList": {
        "properties": {
          "data": {
            "description": "Best first; at most 3. Empty when there is nothing to go on.",
            "items": {
              "$ref": "#/components/schemas/AccountSuggestionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "transfers": {
            "description": "The transfers it probably is, best first. Empty when it is unlikely to be one, is already one, or is decided.",
            "items": {
              "$ref": "#/components/schemas/TransferSuggestionOut"
            },
            "title": "Transfers",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "AccountSuggestionList",
        "type": "object"
      },
      "AccountSuggestionOut": {
        "description": "An account this transaction probably belongs in, and why.",
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "account_type": {
            "description": "`income` or `expense`.",
            "title": "Account Type",
            "type": "string"
          },
          "counterparty_default": {
            "default": false,
            "description": "True when this is the account the transaction's counterparty files to by default (`default_account_id` on the counterparty). It leads the list.",
            "title": "Counterparty Default",
            "type": "boolean"
          },
          "kind": {
            "const": "account",
            "default": "account",
            "description": "What picking it does: `account` files the transaction under this account.",
            "title": "Kind",
            "type": "string"
          },
          "model_confidence": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model's confidence, 0 to 1, when it proposed this account; null otherwise.",
            "title": "Model Confidence"
          },
          "model_reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model's own words for why, when it proposed this account.",
            "title": "Model Reasoning"
          },
          "reasons": {
            "description": "Why it is suggested, strongest first.",
            "items": {
              "$ref": "#/components/schemas/SuggestionReasonOut"
            },
            "title": "Reasons",
            "type": "array"
          },
          "score": {
            "default": "0",
            "description": "0 to 1, deterministic: the strongest of its reasons. A model's proposal scores its own confidence.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Score",
            "type": "string"
          },
          "times_filed": {
            "description": "How many of the payee's other transactions a person or a rule filed to this account. 0 when only the model suggests it.",
            "title": "Times Filed",
            "type": "integer"
          },
          "times_proposed": {
            "default": 0,
            "description": "How many people proposed this account for this transaction in a comment that is not yet resolved. Those lead the list.",
            "title": "Times Proposed",
            "type": "integer"
          }
        },
        "required": [
          "account_id",
          "account_code",
          "account_name",
          "account_type",
          "times_filed",
          "model_confidence",
          "model_reasoning"
        ],
        "title": "AccountSuggestionOut",
        "type": "object"
      },
      "AccountSwingOut": {
        "description": "An income-statement account whose month is far from its usual month.",
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "amount": {
            "description": "The month's movement, what closing posts included, signed by the account's normal balance: revenue and expense both positive.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "drivers": {
            "description": "What moved it, the largest change first; at most 3.",
            "items": {
              "$ref": "#/components/schemas/SwingDriverOut"
            },
            "title": "Drivers",
            "type": "array"
          },
          "usual": {
            "description": "The average of the 3 months before.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Usual",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "account_code",
          "account_name",
          "amount",
          "usual",
          "drivers"
        ],
        "title": "AccountSwingOut",
        "type": "object"
      },
      "AccountTaxLineIn": {
        "properties": {
          "tax_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A key from `GET /v1/tax_lines`; null goes back to the default. A balance-sheet account takes a Schedule L line, an income or expense account any other.",
            "title": "Tax Line"
          }
        },
        "required": [
          "tax_line"
        ],
        "title": "AccountTaxLineIn",
        "type": "object"
      },
      "AccountTaxLineList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AccountTaxLineOut"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "AccountTaxLineList",
        "type": "object"
      },
      "AccountTaxLineOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_type": {
            "title": "Account Type",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "source": {
            "description": "`chosen` by a person, or the default by the account's `code` in the standard chart, or by its `type`.",
            "title": "Source",
            "type": "string"
          },
          "tax_line": {
            "title": "Tax Line",
            "type": "string"
          },
          "tax_line_label": {
            "title": "Tax Line Label",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "account_type",
          "tax_line",
          "tax_line_label",
          "source"
        ],
        "title": "AccountTaxLineOut",
        "type": "object"
      },
      "AccountUnderReviewOut": {
        "description": "An account a month's close reviews, and its review if it has one.",
        "properties": {
          "account_code": {
            "description": "Its code in the chart.",
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "The account.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "description": "Its name.",
            "title": "Account Name",
            "type": "string"
          },
          "account_type": {
            "description": "`asset` or `liability`.",
            "title": "Account Type",
            "type": "string"
          },
          "balance": {
            "description": "Its balance at the month's end, as the ledger says now.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Balance",
            "type": "string"
          },
          "moved": {
            "description": "Reviewed, and the ledger's balance has changed since: worth looking at again.",
            "title": "Moved",
            "type": "boolean"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountReviewOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its review in the month's close, or null."
          }
        },
        "required": [
          "account_id",
          "account_code",
          "account_name",
          "account_type",
          "balance",
          "moved",
          "review"
        ],
        "title": "AccountUnderReviewOut",
        "type": "object"
      },
      "AccrueIn": {
        "properties": {
          "account_id": {
            "description": "The expense account the cost belongs to.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "The estimate, in the books' currency.",
            "title": "Amount"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who will charge it. With one, the close of the month their charge to the same account lands releases the accrual by itself.",
            "title": "Counterparty Id"
          },
          "description": {
            "description": "What the cost is, such as \"AWS for September\".",
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "dimensions": {
            "description": "The department, and the value of any other dimension, the cost and its release carry, at most one per dimension. Required when the account requires one (`dimension_required`); refused with `dimension_invalid` when a value is not of the dimension named.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          },
          "month": {
            "description": "Any day of the month the cost was used. That month's close posts it.",
            "format": "date",
            "title": "Month",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "month",
          "amount",
          "description"
        ],
        "title": "AccrueIn",
        "type": "object"
      },
      "AgingOut": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "control_balance": {
            "description": "The control accounts' balance from lines that name a party, on the owed side: the aging's total equals it.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Control Balance",
            "type": "string"
          },
          "ledger": {
            "title": "Ledger",
            "type": "string"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/AgingRowOut"
            },
            "title": "Rows",
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/AgingRowOut",
            "description": "Every party together; `party_id` is null."
          }
        },
        "required": [
          "ledger",
          "as_of",
          "rows",
          "totals",
          "control_balance"
        ],
        "title": "AgingOut",
        "type": "object"
      },
      "AgingRowOut": {
        "properties": {
          "current": {
            "description": "Not yet due, and payments not yet applied.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Current",
            "type": "string"
          },
          "days_1_30": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Days 1 30",
            "type": "string"
          },
          "days_31_60": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Days 31 60",
            "type": "string"
          },
          "days_61_90": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Days 61 90",
            "type": "string"
          },
          "over_90": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Over 90",
            "type": "string"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "The counterparty; null on the totals row.",
            "title": "Party Id"
          },
          "party_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Name"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "party_id",
          "party_name",
          "current",
          "days_1_30",
          "days_31_60",
          "days_61_90",
          "over_90",
          "total"
        ],
        "title": "AgingRowOut",
        "type": "object"
      },
      "AllocationCreate": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "At most what both items have left.",
            "title": "Amount"
          },
          "credit_item_id": {
            "description": "A payment on AR, a bill on AP.",
            "examples": [
              "oi_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Credit Item Id",
            "type": "string",
            "x-id-prefix": "oi"
          },
          "debit_item_id": {
            "description": "An invoice on AR, a payment on AP.",
            "examples": [
              "oi_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Debit Item Id",
            "type": "string",
            "x-id-prefix": "oi"
          },
          "effective_on": {
            "description": "The day it takes effect: on or after both items' days.",
            "format": "date",
            "title": "Effective On",
            "type": "string"
          }
        },
        "required": [
          "debit_item_id",
          "credit_item_id",
          "amount",
          "effective_on"
        ],
        "title": "AllocationCreate",
        "type": "object"
      },
      "AllocationOut": {
        "properties": {
          "amount": {
            "description": "Positive; minus the allocation it undoes when `reverses_id` is set.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "credit_item_id": {
            "description": "An id that starts with `oi_`.",
            "examples": [
              "oi_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Credit Item Id",
            "type": "string",
            "x-id-prefix": "oi"
          },
          "debit_item_id": {
            "description": "An id that starts with `oi_`.",
            "examples": [
              "oi_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Debit Item Id",
            "type": "string",
            "x-id-prefix": "oi"
          },
          "effective_on": {
            "format": "date",
            "title": "Effective On",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `alloc_`.",
            "examples": [
              "alloc_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "alloc"
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          },
          "reverses_id": {
            "anyOf": [
              {
                "description": "An id that starts with `alloc_`.",
                "examples": [
                  "alloc_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "alloc"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reverses Id"
          },
          "settlement_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The reversal entry that made it, when one did.",
            "title": "Settlement Entry Id"
          }
        },
        "required": [
          "id",
          "debit_item_id",
          "credit_item_id",
          "amount",
          "effective_on",
          "settlement_entry_id",
          "reverses_id",
          "created_by",
          "recorded_at"
        ],
        "title": "AllocationOut",
        "type": "object"
      },
      "AnswerIn": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "File the transaction the question is about under this GL account, as filing it by hand does, and close the question. Transactions only; needs `books.post`.",
            "title": "Account Id"
          },
          "answer": {
            "maxLength": 5000,
            "minLength": 1,
            "title": "Answer",
            "type": "string"
          },
          "dimensions": {
            "description": "The department, and any other dimension value, the transaction names when it is filed. A value it already names stands.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          },
          "rule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AnswerRuleIn"
              },
              {
                "type": "null"
              }
            ],
            "description": "\"Do this every time\": write a rule from this answer, so the same question is never asked again. The transaction is filed under the rule's account when `account_id` is absent. Validated when written: a header or closed account is refused, and the answer is kept with `filing_refused` saying why."
          }
        },
        "required": [
          "answer"
        ],
        "title": "AnswerIn",
        "type": "object"
      },
      "AnswerRuleIn": {
        "description": "\"Do this every time\": the narrowest rule covering the transaction \u2014\nits counterparty by name (or its description, when it names none), on\nthe same event type \u2014 filing to `account_id`.",
        "properties": {
          "account_id": {
            "description": "The GL account every matching transaction is filed to.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "dimensions": {
            "description": "The department, and any other dimension value, a matching transaction names.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          },
          "document_kind": {
            "anyOf": [
              {
                "enum": [
                  "invoice",
                  "receipt",
                  "none"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only with this paper behind it: an `invoice` or `receipt` linked as evidence, or `none` for a transaction with no paper. Any when absent.",
            "title": "Document Kind"
          },
          "memo_pattern": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when the memo \u2014 the description, or the line the bank printed \u2014 holds these words.",
            "title": "Memo Pattern"
          }
        },
        "required": [
          "account_id"
        ],
        "title": "AnswerRuleIn",
        "type": "object"
      },
      "ApplicationIn": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "How much of the payment goes to it.",
            "title": "Amount"
          },
          "document_id": {
            "description": "An issued invoice (money in) or approved bill (money out) of the same party.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Document Id",
            "type": "string",
            "x-id-prefix": "*"
          }
        },
        "required": [
          "document_id",
          "amount"
        ],
        "title": "ApplicationIn",
        "type": "object"
      },
      "AppliedOut": {
        "properties": {
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "document": {
            "description": "`invoice` or `bill`.",
            "title": "Document",
            "type": "string"
          },
          "document_id": {
            "description": "An id. Which resource it names is given by the field beside it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Document Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "number": {
            "description": "The invoice's number, or the vendor's number for the bill.",
            "title": "Number",
            "type": "string"
          }
        },
        "required": [
          "document",
          "document_id",
          "number",
          "amount"
        ],
        "title": "AppliedOut",
        "type": "object"
      },
      "ApprovalAsk": {
        "properties": {
          "expires_in_hours": {
            "anyOf": [
              {
                "maximum": 720.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How long the approval stands once given; 72 hours when left out.",
            "title": "Expires In Hours"
          }
        },
        "title": "ApprovalAsk",
        "type": "object"
      },
      "ApprovalDecide": {
        "properties": {
          "comment": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "decision": {
            "description": "`approve` or `reject`.",
            "title": "Decision",
            "type": "string"
          }
        },
        "required": [
          "decision"
        ],
        "title": "ApprovalDecide",
        "type": "object"
      },
      "ApprovalOut": {
        "properties": {
          "action": {
            "description": "What it lets happen: `payment.send` or `agent.change`.",
            "title": "Action",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "can_decide": {
            "description": "Whether the caller may decide it here: pending, and theirs to approve (`money.approve`, or an approval limit in its currency that covers its amount).",
            "title": "Can Decide",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "decided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decided At"
          },
          "decisions": {
            "items": {
              "$ref": "#/components/schemas/DecisionOut"
            },
            "title": "Decisions",
            "type": "array"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "description": "An id that starts with `appr_`.",
            "examples": [
              "appr_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "appr"
          },
          "requested_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested By"
          },
          "stands": {
            "description": "Approved, unexpired, and the subject is still what it was when asked: false once a payment's amount or destination changes.",
            "title": "Stands",
            "type": "boolean"
          },
          "status": {
            "description": "`pending`, `approved`, `rejected` or `cancelled`.",
            "title": "Status",
            "type": "string"
          },
          "subject_id": {
            "description": "An id. Which resource it names is given by the field beside it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_type": {
            "description": "What is approved: `payment`, or `agent_action` (a change the assistant proposed).",
            "title": "Subject Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "subject_type",
          "subject_id",
          "action",
          "amount",
          "currency",
          "status",
          "expires_at",
          "stands",
          "requested_by",
          "decided_at",
          "decisions",
          "can_decide",
          "created_at"
        ],
        "title": "ApprovalOut",
        "type": "object"
      },
      "ApprovalPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ApprovalOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ApprovalPage",
        "type": "object"
      },
      "ApproveException": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "File it under this GL account instead of the recommendation (for a missing accrual, the expense account to accrue to). Required when the item has no recommendation.",
            "title": "Account Id"
          },
          "always": {
            "default": false,
            "description": "Also file every later transaction with this counterparty here: writes a rule matching the counterparty's name exactly.",
            "title": "Always",
            "type": "boolean"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A missing accrual: the estimate to accrue, in the books' currency, instead of the vendor's usual month (the item's `amount`).",
            "title": "Amount"
          },
          "dimensions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/LineDimensionIn"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "A missing accrual: the department, and the value of any other dimension, the accrual carries, at most one per dimension. Left out, the values the vendor's charges to the account agree on.",
            "title": "Dimensions"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Kept with the filing.",
            "title": "Note"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "A payroll department: the department to add it under, instead of the one the item proposes (`detail.parent_id`).",
            "title": "Parent Id"
          }
        },
        "title": "ApproveException",
        "type": "object"
      },
      "ArchiveAccount": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "control_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`ar`, `ap` or `processor_clearing`.",
            "title": "Control Role"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 4217; null means the books' own.",
            "title": "Currency"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_postable": {
            "default": true,
            "title": "Is Postable",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "parent_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The header account it sits under.",
            "title": "Parent Code"
          },
          "required_dimensions": {
            "description": "Keys of the dimensions every line on it names.",
            "items": {
              "type": "string"
            },
            "title": "Required Dimensions",
            "type": "array"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "type": {
            "description": "`asset`, `liability`, `equity`, `income` or `expense`.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "code",
          "name",
          "type"
        ],
        "title": "ArchiveAccount",
        "type": "object"
      },
      "ArchiveCompany": {
        "properties": {
          "books_start_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first day the books cover, when one was set.",
            "title": "Books Start On"
          },
          "currency": {
            "description": "ISO 4217. A restore needs books in the same currency.",
            "title": "Currency",
            "type": "string"
          },
          "fiscal_year_end_month": {
            "description": "1\u201312: the month the fiscal year ends in.",
            "maximum": 12.0,
            "minimum": 1.0,
            "title": "Fiscal Year End Month",
            "type": "integer"
          },
          "name": {
            "description": "The name the books were kept under.",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "currency",
          "fiscal_year_end_month"
        ],
        "title": "ArchiveCompany",
        "type": "object"
      },
      "ArchiveCounterparty": {
        "properties": {
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "default_account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Account Code"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "is_customer": {
            "default": false,
            "title": "Is Customer",
            "type": "boolean"
          },
          "is_vendor": {
            "default": false,
            "title": "Is Vendor",
            "type": "boolean"
          },
          "merged_into_ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The `ref` of the counterparty this one was merged into; posted lines may still name it.",
            "title": "Merged Into Ref"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Days"
          },
          "ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "What lines in this archive call it by.",
            "title": "Ref"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "roles": {
            "description": "What they are to these books. An archive written before roles has none here, and `is_customer` and `is_vendor` say.",
            "items": {
              "$ref": "#/components/schemas/ArchivePartyRole"
            },
            "title": "Roles",
            "type": "array"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "tax_classification": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Classification"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whole only when the exporter holds `sensitive.read`; otherwise left out.",
            "title": "Tax Id"
          },
          "w9_received_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "W9 Received On"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "required": [
          "ref",
          "name",
          "slug"
        ],
        "title": "ArchiveCounterparty",
        "type": "object"
      },
      "ArchiveDimension": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "values": {
            "items": {
              "$ref": "#/components/schemas/ArchiveDimensionValue"
            },
            "title": "Values",
            "type": "array"
          }
        },
        "required": [
          "key",
          "name"
        ],
        "title": "ArchiveDimension",
        "type": "object"
      },
      "ArchiveDimensionValue": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "parent_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Code"
          }
        },
        "required": [
          "code",
          "name"
        ],
        "title": "ArchiveDimensionValue",
        "type": "object"
      },
      "ArchiveEntry-Input": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/ArchiveLine-Input"
            },
            "minItems": 2,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "description": "Its number in the books it came from.",
            "title": "Number",
            "type": "integer"
          },
          "posted_at": {
            "description": "When it was posted in the books it came from.",
            "format": "date-time",
            "title": "Posted At",
            "type": "string"
          },
          "ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "What reversals and replacements in this archive call it by.",
            "title": "Ref"
          },
          "replaces_ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replaces Ref"
          },
          "reverses_ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reverses Ref"
          },
          "source": {
            "description": "What wrote it: `manual`, `ingest`, `opening`, `closing`, `reversal` or `schedule`.",
            "title": "Source",
            "type": "string"
          },
          "status": {
            "description": "`posted`, or `reversed` when a later entry undid it.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "ref",
          "number",
          "entry_date",
          "description",
          "source",
          "status",
          "posted_at",
          "lines"
        ],
        "title": "ArchiveEntry",
        "type": "object"
      },
      "ArchiveEntry-Output": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/ArchiveLine-Output"
            },
            "minItems": 2,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "description": "Its number in the books it came from.",
            "title": "Number",
            "type": "integer"
          },
          "posted_at": {
            "description": "When it was posted in the books it came from.",
            "format": "date-time",
            "title": "Posted At",
            "type": "string"
          },
          "ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "What reversals and replacements in this archive call it by.",
            "title": "Ref"
          },
          "replaces_ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replaces Ref"
          },
          "reverses_ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reverses Ref"
          },
          "source": {
            "description": "What wrote it: `manual`, `ingest`, `opening`, `closing`, `reversal` or `schedule`.",
            "title": "Source",
            "type": "string"
          },
          "status": {
            "description": "`posted`, or `reversed` when a later entry undid it.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "ref",
          "number",
          "entry_date",
          "description",
          "source",
          "status",
          "posted_at",
          "lines"
        ],
        "title": "ArchiveEntry",
        "type": "object"
      },
      "ArchiveLine-Input": {
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "Unsigned; `direction` carries the sign.",
            "title": "Amount"
          },
          "dimensions": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Dimension key \u2192 value code.",
            "title": "Dimensions",
            "type": "object"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The `ref` of a counterparty in this archive.",
            "title": "Party Ref"
          }
        },
        "required": [
          "account_code",
          "direction",
          "amount"
        ],
        "title": "ArchiveLine",
        "type": "object"
      },
      "ArchiveLine-Output": {
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "amount": {
            "description": "Unsigned; `direction` carries the sign.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "dimensions": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Dimension key \u2192 value code.",
            "title": "Dimensions",
            "type": "object"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_ref": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The `ref` of a counterparty in this archive.",
            "title": "Party Ref"
          }
        },
        "required": [
          "account_code",
          "direction",
          "amount"
        ],
        "title": "ArchiveLine",
        "type": "object"
      },
      "ArchivePartyRole": {
        "properties": {
          "form_1099_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form 1099 Category"
          },
          "is_1099_eligible": {
            "default": false,
            "title": "Is 1099 Eligible",
            "type": "boolean"
          },
          "role": {
            "description": "customer, vendor, employee, investor, lender or founder.",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "title": "ArchivePartyRole",
        "type": "object"
      },
      "ArchiveTrialBalance-Input": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/ArchiveTrialBalanceRow-Input"
            },
            "title": "Rows",
            "type": "array"
          },
          "total_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Total Credits"
          },
          "total_debits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Total Debits"
          }
        },
        "required": [
          "as_of",
          "rows",
          "total_debits",
          "total_credits"
        ],
        "title": "ArchiveTrialBalance",
        "type": "object"
      },
      "ArchiveTrialBalance-Output": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/ArchiveTrialBalanceRow-Output"
            },
            "title": "Rows",
            "type": "array"
          },
          "total_credits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Credits",
            "type": "string"
          },
          "total_debits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Debits",
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "rows",
          "total_debits",
          "total_credits"
        ],
        "title": "ArchiveTrialBalance",
        "type": "object"
      },
      "ArchiveTrialBalanceRow-Input": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "credit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Credit"
          },
          "debit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Debit"
          }
        },
        "required": [
          "code",
          "debit",
          "credit"
        ],
        "title": "ArchiveTrialBalanceRow",
        "type": "object"
      },
      "ArchiveTrialBalanceRow-Output": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "credit": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Credit",
            "type": "string"
          },
          "debit": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Debit",
            "type": "string"
          }
        },
        "required": [
          "code",
          "debit",
          "credit"
        ],
        "title": "ArchiveTrialBalanceRow",
        "type": "object"
      },
      "AskedOut": {
        "properties": {
          "approval_id": {
            "description": "An id that starts with `appr_`.",
            "examples": [
              "appr_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Approval Id",
            "type": "string",
            "x-id-prefix": "appr"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "approval_id",
          "status",
          "expires_at"
        ],
        "title": "AskedOut",
        "type": "object"
      },
      "AssignException": {
        "properties": {
          "assigned_to": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member to work it: a user who opens these books. Null to hand it back.",
            "title": "Assigned To"
          }
        },
        "required": [
          "assigned_to"
        ],
        "title": "AssignException",
        "type": "object"
      },
      "AttentionItemOut": {
        "properties": {
          "blocking": {
            "description": "True for what stops the books being right: an unhealthy connection, an overdue close.",
            "title": "Blocking",
            "type": "boolean"
          },
          "count": {
            "description": "How many: connections (also those that may not read the provider's people), overdue tasks, open questions waiting on the caller (`questions_for_you`), transactions, documents, or open items waiting on the owner (`exceptions_open`).",
            "title": "Count",
            "type": "integer"
          },
          "kind": {
            "description": "`connection_failing`, `connection_reauth`, `connection_behind`, `close_overdue`, `connection_people_unreadable`, `questions_for_you`, `transactions_to_review`, `documents_to_match` or `exceptions_open`.",
            "title": "Kind",
            "type": "string"
          },
          "period_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For `close_overdue`, the month (`2026-09`) whose tasks are overdue.",
            "title": "Period Key"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a connection item, the provider of the first such connection, such as `mercury`.",
            "title": "Provider"
          },
          "subject_about": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What kind of record that is: `transaction` or `journal_entry`.",
            "title": "Subject About"
          },
          "subject_id": {
            "anyOf": [
              {
                "description": "An id. Which resource it names is given by the field beside it.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "*"
              },
              {
                "type": "null"
              }
            ],
            "description": "For `questions_for_you`, the record the oldest of those questions is about, where it is answered or closed.",
            "title": "Subject Id"
          }
        },
        "required": [
          "kind",
          "count",
          "blocking"
        ],
        "title": "AttentionItemOut",
        "type": "object"
      },
      "AttentionOut": {
        "description": "What needs a person today, blocking items first; nothing listed when\nnothing needs anyone.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AttentionItemOut"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AttentionOut",
        "type": "object"
      },
      "AuditArchiveLink": {
        "properties": {
          "sha256": {
            "description": "What the bytes behind the link hash to.",
            "title": "Sha256",
            "type": "string"
          },
          "url": {
            "description": "A signed link to the segment's JSON lines; it expires.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "sha256"
        ],
        "title": "AuditArchiveLink",
        "type": "object"
      },
      "AuditArchiveSegmentOut": {
        "properties": {
          "event_count": {
            "description": "How many audit rows it holds.",
            "title": "Event Count",
            "type": "integer"
          },
          "first_audit_id": {
            "description": "The lowest audit row id it holds.",
            "examples": [
              "audit_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "First Audit Id",
            "type": "string",
            "x-id-prefix": "audit"
          },
          "last_audit_id": {
            "description": "The highest audit row id it holds.",
            "examples": [
              "audit_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Last Audit Id",
            "type": "string",
            "x-id-prefix": "audit"
          },
          "previous_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The hash of the segment before; null for the first.",
            "title": "Previous Sha256"
          },
          "sequence": {
            "description": "The segment's place in the chain, from 1.",
            "title": "Sequence",
            "type": "integer"
          },
          "sha256": {
            "description": "The hash of the segment's bytes.",
            "title": "Sha256",
            "type": "string"
          },
          "written_at": {
            "description": "When the segment's bytes landed in the archive.",
            "format": "date-time",
            "title": "Written At",
            "type": "string"
          }
        },
        "required": [
          "sequence",
          "first_audit_id",
          "last_audit_id",
          "event_count",
          "sha256",
          "previous_sha256",
          "written_at"
        ],
        "title": "AuditArchiveSegmentOut",
        "type": "object"
      },
      "AuditArchiveSegmentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AuditArchiveSegmentOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "AuditArchiveSegmentPage",
        "type": "object"
      },
      "AuditEventOut": {
        "properties": {
          "action": {
            "description": "What happened, dotted and past tense: `entry.posted`.",
            "title": "Action",
            "type": "string"
          },
          "actor_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That member's profile picture, while they are still in the books and have one; null otherwise.",
            "title": "Actor Avatar Url"
          },
          "actor_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That member's email, while they are still in the books; null once they have left.",
            "title": "Actor Email"
          },
          "actor_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who did it; null for the system and a model.",
            "title": "Actor Id"
          },
          "actor_kind": {
            "description": "Who decided: `user` (a member, through the app or the API), `system` (the books themselves: a sync, a schedule, a rule) or `model` (a model's proposal).",
            "enum": [
              "user",
              "system",
              "model"
            ],
            "title": "Actor Kind",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How much moved, in the books' currency: a posted entry's total. Null for an action that moved nothing, or whose amount is in another currency.",
            "title": "Amount"
          },
          "assistant_conversation_id": {
            "anyOf": [
              {
                "description": "An id that starts with `conv_`.",
                "examples": [
                  "conv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "conv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The conversation it was proposed in, when it is the caller's own; a conversation is private to the person who had it.",
            "title": "Assistant Conversation Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the action recorded about itself; its shape varies.",
            "title": "Detail"
          },
          "id": {
            "description": "An id that starts with `audit_`.",
            "examples": [
              "audit_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "audit"
          },
          "links": {
            "description": "The other records the action touched, each with the part it played: the accounts an entry debited and credited, the account a transaction was filed to, the entry that reversed this one.",
            "items": {
              "$ref": "#/components/schemas/AuditLinkOut"
            },
            "title": "Links",
            "type": "array"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why, in the words of whoever did it, where they gave one: a reversal's reason, a filing's note.",
            "title": "Reason"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The request that made the change, when one did.",
            "title": "Request Id"
          },
          "subject_id": {
            "description": "That record's id, prefixed for its kind. A row recorded before the record's kind took uuids names the record by its id today when it still exists, and by its old number when it does not.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The record as a person names it: an entry's description, a transaction's, an account's code and name, a period's month. Null for a kind with no name of its own, and for a record that is gone.",
            "title": "Subject Label"
          },
          "subject_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the record is opened by, where that is not its id: an entry's number, a period's `YYYY-MM` key, the id of the account a reconciliation checked.",
            "title": "Subject Ref"
          },
          "subject_type": {
            "description": "The kind of record it happened to: `journal_entry`, `financial_event` (a transaction), `account`, `accounting_period`, \u2026",
            "title": "Subject Type",
            "type": "string"
          },
          "via_assistant": {
            "default": false,
            "description": "The change was proposed by the assistant and approved by the member named as the actor.",
            "title": "Via Assistant",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "created_at",
          "actor_kind",
          "action",
          "subject_type",
          "subject_id"
        ],
        "title": "AuditEventOut",
        "type": "object"
      },
      "AuditEventPage": {
        "properties": {
          "currency": {
            "description": "The books' currency: what every row's `amount` is in.",
            "title": "Currency",
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AuditEventOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor",
          "currency"
        ],
        "title": "AuditEventPage",
        "type": "object"
      },
      "AuditLinkOut": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The record as a person names it; null for a record that is gone.",
            "title": "Label"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the record is opened by, where that is not its id.",
            "title": "Ref"
          },
          "role": {
            "description": "The part the record played: `debit` and `credit` (an account an entry moved), `filed_to`, `learned_rule`, `reversed_by`, `replaced_by`, `from_account`, `to_account`, `matched_with` or `merged_into`.",
            "enum": [
              "debit",
              "credit",
              "filed_to",
              "learned_rule",
              "reversed_by",
              "replaced_by",
              "from_account",
              "to_account",
              "matched_with",
              "merged_into"
            ],
            "title": "Role",
            "type": "string"
          },
          "subject_id": {
            "description": "That record's id, prefixed for its kind.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_type": {
            "description": "The kind of record, as `subject_type` names kinds.",
            "title": "Subject Type",
            "type": "string"
          }
        },
        "required": [
          "role",
          "subject_type",
          "subject_id"
        ],
        "title": "AuditLinkOut",
        "type": "object"
      },
      "AutonomyDefaultsOut": {
        "properties": {
          "confidence_threshold": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Confidence Threshold",
            "type": "string"
          },
          "materiality_ceiling": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Materiality Ceiling",
            "type": "string"
          },
          "new_counterparty_ceiling": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "New Counterparty Ceiling",
            "type": "string"
          }
        },
        "required": [
          "confidence_threshold",
          "materiality_ceiling",
          "new_counterparty_ceiling"
        ],
        "title": "AutonomyDefaultsOut",
        "type": "object"
      },
      "AutonomyLimitsOut": {
        "properties": {
          "confidence_ceiling": {
            "description": "The highest confidence threshold any books may set.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Confidence Ceiling",
            "type": "string"
          },
          "confidence_floor": {
            "description": "The lowest confidence threshold any books may set.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Confidence Floor",
            "type": "string"
          },
          "materiality_limit": {
            "description": "The highest materiality ceiling any books may set.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Materiality Limit",
            "type": "string"
          },
          "new_counterparty_limit": {
            "description": "The highest ceiling any books may set for a counterparty they have never posted.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "New Counterparty Limit",
            "type": "string"
          }
        },
        "required": [
          "confidence_floor",
          "confidence_ceiling",
          "materiality_limit",
          "new_counterparty_limit"
        ],
        "title": "AutonomyLimitsOut",
        "type": "object"
      },
      "AutonomyMonthOut": {
        "description": "One month of the books' autonomy figures.",
        "properties": {
          "accountant_interventions": {
            "description": "Interventions by an accountant of these books or by an accounting firm's staff.",
            "title": "Accountant Interventions",
            "type": "integer"
          },
          "accountant_interventions_per_1000": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Accountant interventions per 1,000 events, to one place; null when there are no events.",
            "title": "Accountant Interventions Per 1000"
          },
          "ai_acceptance_rate": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`ai_approved / (ai_approved + ai_corrected)`, from 0 to 1, to four places; null when a person reviewed none.",
            "title": "Ai Acceptance Rate"
          },
          "ai_approved": {
            "description": "The model's categories a person reviewed and kept.",
            "title": "Ai Approved",
            "type": "integer"
          },
          "ai_corrected": {
            "description": "The model's categories a person reviewed and changed.",
            "title": "Ai Corrected",
            "type": "integer"
          },
          "autonomous": {
            "description": "Of those, the ones a rule or the model decided (or that needed no category) and that are in the books or ready to post, with no person ever filing them.",
            "title": "Autonomous",
            "type": "integer"
          },
          "autonomous_rate": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`autonomous / events`, from 0 to 1, to four places; null when there are no events.",
            "title": "Autonomous Rate"
          },
          "ends_on": {
            "description": "The month's last day.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "events": {
            "description": "Economic events dated in the month: transactions, without authorisations, the excluded twin of a transfer or duplicate, and rows the provider removed.",
            "title": "Events",
            "type": "integer"
          },
          "founder_interventions": {
            "description": "Interventions by an owner or admin of these books.",
            "title": "Founder Interventions",
            "type": "integer"
          },
          "founder_interventions_per_1000": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Founder interventions per 1,000 events, to one place; null when there are no events.",
            "title": "Founder Interventions Per 1000"
          },
          "interventions": {
            "description": "A person's counted work on the month's records (accounting contributions with weight above zero): a transaction by its date, an entry by its date, anything else by the day it was done.",
            "title": "Interventions",
            "type": "integer"
          },
          "interventions_per_1000": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Interventions per 1,000 events, to one place; null when there are no events.",
            "title": "Interventions Per 1000"
          },
          "other_interventions": {
            "description": "Interventions by anyone else: members, viewers, people no longer in the books.",
            "title": "Other Interventions",
            "type": "integer"
          },
          "period_key": {
            "description": "The month, as `YYYY-MM`.",
            "title": "Period Key",
            "type": "string"
          },
          "questions_asked": {
            "description": "Questions asked in the month (UTC).",
            "title": "Questions Asked",
            "type": "integer"
          },
          "questions_removed_by_policy": {
            "description": "Questions not sent in the month because a rule \u2014 often one an earlier answer wrote \u2014 already covered the transaction, and filed it.",
            "title": "Questions Removed By Policy",
            "type": "integer"
          },
          "repeated_questions": {
            "description": "Of those, the ones about a transaction whose counterparty an earlier question, in any month, was already about.",
            "title": "Repeated Questions",
            "type": "integer"
          },
          "starts_on": {
            "description": "The month's first day.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          }
        },
        "required": [
          "period_key",
          "starts_on",
          "ends_on",
          "events",
          "autonomous",
          "autonomous_rate",
          "interventions",
          "founder_interventions",
          "accountant_interventions",
          "other_interventions",
          "interventions_per_1000",
          "founder_interventions_per_1000",
          "accountant_interventions_per_1000",
          "ai_approved",
          "ai_corrected",
          "ai_acceptance_rate",
          "questions_asked",
          "repeated_questions",
          "questions_removed_by_policy"
        ],
        "title": "AutonomyMonthOut",
        "type": "object"
      },
      "AutonomyPolicyIn": {
        "properties": {
          "confidence_threshold": {
            "anyOf": [
              {
                "maximum": 0.99,
                "minimum": 0.8,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$",
                "type": "string"
              }
            ],
            "description": "Between the confidence floor and ceiling, to two decimals.",
            "title": "Confidence Threshold"
          },
          "materiality_ceiling": {
            "anyOf": [
              {
                "maximum": 25000.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$",
                "type": "string"
              }
            ],
            "description": "Between 0 and the materiality limit.",
            "title": "Materiality Ceiling"
          },
          "new_counterparty_ceiling": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$",
                "type": "string"
              }
            ],
            "description": "Between 0 and the lower of the new-counterparty limit and this policy's materiality ceiling.",
            "title": "New Counterparty Ceiling"
          }
        },
        "required": [
          "confidence_threshold",
          "materiality_ceiling",
          "new_counterparty_ceiling"
        ],
        "title": "AutonomyPolicyIn",
        "type": "object"
      },
      "AutonomyPolicyOut": {
        "properties": {
          "confidence_threshold": {
            "description": "How sure the model must be, from 0 to 1, before its category posts without a person.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Confidence Threshold",
            "type": "string"
          },
          "customized": {
            "description": "False while these books use the defaults.",
            "title": "Customized",
            "type": "boolean"
          },
          "defaults": {
            "$ref": "#/components/schemas/AutonomyDefaultsOut"
          },
          "limits": {
            "$ref": "#/components/schemas/AutonomyLimitsOut"
          },
          "materiality_ceiling": {
            "description": "The amount above which a person always reviews the model's category, however sure it is.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Materiality Ceiling",
            "type": "string"
          },
          "new_counterparty_ceiling": {
            "description": "For a counterparty the books have never posted, the amount above which a person reviews.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "New Counterparty Ceiling",
            "type": "string"
          },
          "version": {
            "description": "Which of these books' policies this is: 0 for the shipped defaults, counting up with each change. Every model decision names the version it was judged by.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "confidence_threshold",
          "materiality_ceiling",
          "new_counterparty_ceiling",
          "customized",
          "version",
          "defaults",
          "limits"
        ],
        "title": "AutonomyPolicyOut",
        "type": "object"
      },
      "AutonomyVersionOut": {
        "properties": {
          "confidence_threshold": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The confidence a model's category must reach to post without a person; null when `is_default`.",
            "title": "Confidence Threshold"
          },
          "decided_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The person who made the change, while they have an account.",
            "title": "Decided By"
          },
          "decided_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their email as these books' roster has it; null once they have left the books.",
            "title": "Decided By Email"
          },
          "is_default": {
            "description": "A reset to the defaults; the thresholds are then null.",
            "title": "Is Default",
            "type": "boolean"
          },
          "materiality_ceiling": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The amount above which a person reviews; null when `is_default`.",
            "title": "Materiality Ceiling"
          },
          "new_counterparty_ceiling": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a counterparty the books have never posted, the amount above which a person reviews; null when `is_default`.",
            "title": "New Counterparty Ceiling"
          },
          "recorded_at": {
            "description": "When this version was recorded.",
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          },
          "version": {
            "description": "The version number; each change to the thresholds records the next.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "is_default",
          "confidence_threshold",
          "materiality_ceiling",
          "new_counterparty_ceiling",
          "decided_by",
          "recorded_at"
        ],
        "title": "AutonomyVersionOut",
        "type": "object"
      },
      "AutonomyVersionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AutonomyVersionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "AutonomyVersionPage",
        "type": "object"
      },
      "AwardMonthOut": {
        "properties": {
          "ends_on": {
            "description": "The month's last day.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "expense_to_date": {
            "description": "What it should have cost by the end of the month, in all.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Expense To Date",
            "type": "string"
          },
          "vested_shares": {
            "description": "Shares vested by the end of the month.",
            "title": "Vested Shares",
            "type": "integer"
          }
        },
        "required": [
          "ends_on",
          "vested_shares",
          "expense_to_date"
        ],
        "title": "AwardMonthOut",
        "type": "object"
      },
      "AwardRunOut": {
        "properties": {
          "amount": {
            "description": "What the run expensed for this award; below zero when it took expense back.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "entry_id": {
            "description": "The entry that posted it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "period_ends_on": {
            "description": "The month the run expensed.",
            "format": "date",
            "title": "Period Ends On",
            "type": "string"
          },
          "reversed": {
            "description": "Whether that entry was reversed; a reversed run counts for nothing.",
            "title": "Reversed",
            "type": "boolean"
          },
          "run_id": {
            "description": "An id that starts with `sbc_run_`.",
            "examples": [
              "sbc_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Run Id",
            "type": "string",
            "x-id-prefix": "sbc_run"
          }
        },
        "required": [
          "run_id",
          "period_ends_on",
          "amount",
          "entry_id",
          "reversed"
        ],
        "title": "AwardRunOut",
        "type": "object"
      },
      "BalanceHistoryAccountOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "balances": {
            "description": "The account's balance at each point, in the order of `points`.",
            "items": {
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
              "type": "string"
            },
            "title": "Balances",
            "type": "array"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "balances"
        ],
        "title": "BalanceHistoryAccountOut",
        "type": "object"
      },
      "BalanceHistoryGroupOut": {
        "properties": {
          "account_id": {
            "description": "The top-level account the group is named for.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "accounts": {
            "description": "Every account in the group that held a balance at any point.",
            "items": {
              "$ref": "#/components/schemas/BalanceHistoryAccountOut"
            },
            "title": "Accounts",
            "type": "array"
          },
          "balances": {
            "description": "The group's total at each point, in the order of `points`.",
            "items": {
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
              "type": "string"
            },
            "title": "Balances",
            "type": "array"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "type": {
            "description": "`asset` or `liability`.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "type",
          "balances",
          "accounts"
        ],
        "title": "BalanceHistoryGroupOut",
        "type": "object"
      },
      "BalanceHistoryOut": {
        "properties": {
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/BalanceHistoryGroupOut"
            },
            "title": "Groups",
            "type": "array"
          },
          "interval": {
            "title": "Interval",
            "type": "string"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/BalancePointOut"
            },
            "title": "Points",
            "type": "array"
          },
          "since": {
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "until": {
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "since",
          "until",
          "interval",
          "currency",
          "points",
          "groups"
        ],
        "title": "BalanceHistoryOut",
        "type": "object"
      },
      "BalancePointOut": {
        "properties": {
          "assets": {
            "description": "Total assets at the end of `date`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Assets",
            "type": "string"
          },
          "date": {
            "description": "The day this point is the balance sheet as of.",
            "format": "date",
            "title": "Date",
            "type": "string"
          },
          "liabilities": {
            "description": "Total liabilities at the end of `date`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Liabilities",
            "type": "string"
          },
          "net_assets": {
            "description": "Assets less liabilities: equity plus earnings not yet closed.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Assets",
            "type": "string"
          }
        },
        "required": [
          "date",
          "assets",
          "liabilities",
          "net_assets"
        ],
        "title": "BalancePointOut",
        "type": "object"
      },
      "BalanceSheetLineOut": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "amount"
        ],
        "title": "BalanceSheetLineOut",
        "type": "object"
      },
      "BalanceSheetOut": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "assets": {
            "$ref": "#/components/schemas/BalanceSheetSectionOut"
          },
          "balanced": {
            "title": "Balanced",
            "type": "boolean"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "difference": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "equity": {
            "$ref": "#/components/schemas/BalanceSheetSectionOut"
          },
          "liabilities": {
            "$ref": "#/components/schemas/BalanceSheetSectionOut"
          },
          "total_assets": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Assets",
            "type": "string"
          },
          "total_liabilities_and_equity": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Liabilities And Equity",
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "currency",
          "assets",
          "liabilities",
          "equity",
          "total_assets",
          "total_liabilities_and_equity",
          "balanced",
          "difference"
        ],
        "title": "BalanceSheetOut",
        "type": "object"
      },
      "BalanceSheetSectionOut": {
        "properties": {
          "lines": {
            "items": {
              "$ref": "#/components/schemas/BalanceSheetLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "lines",
          "total"
        ],
        "title": "BalanceSheetSectionOut",
        "type": "object"
      },
      "BankStatementDetailOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "closing": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The closing balance the file states, as the ledger reads it (OFX).",
            "title": "Closing"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "ends_on": {
            "description": "The last day a line is dated.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "format": {
            "description": "The file it came in: `csv` or `ofx`.",
            "title": "Format",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `stmt_`.",
            "examples": [
              "stmt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "stmt"
          },
          "lines": {
            "title": "Lines",
            "type": "integer"
          },
          "money_in": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Money In",
            "type": "string"
          },
          "money_out": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Money Out",
            "type": "string"
          },
          "opening": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opening"
          },
          "starts_on": {
            "description": "The first day a line is dated.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "statement_lines": {
            "items": {
              "$ref": "#/components/schemas/BankStatementLineOut"
            },
            "title": "Statement Lines",
            "type": "array"
          },
          "status": {
            "description": "`imported`, or `reconciled` once a close relied on it.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "account_id",
          "starts_on",
          "ends_on",
          "opening",
          "closing",
          "currency",
          "format",
          "filename",
          "status",
          "lines",
          "money_in",
          "money_out",
          "created_at",
          "statement_lines"
        ],
        "title": "BankStatementDetailOut",
        "type": "object"
      },
      "BankStatementLineOut": {
        "properties": {
          "amount": {
            "description": "As the statement prints it: money into the account positive, for a bank and a card alike.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "description": "The line's id: what a match made by hand names.",
            "examples": [
              "stl_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "stl"
          },
          "line_date": {
            "format": "date",
            "title": "Line Date",
            "type": "string"
          },
          "line_no": {
            "description": "Its line in the file.",
            "title": "Line No",
            "type": "integer"
          },
          "match_id": {
            "anyOf": [
              {
                "description": "An id that starts with `match_`.",
                "examples": [
                  "match_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "match"
              },
              {
                "type": "null"
              }
            ],
            "description": "The standing reconciliation match it is in; null while unmatched.",
            "title": "Match Id"
          },
          "transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction it was imported as; one the books already held when the line was a duplicate of the feed.",
            "title": "Transaction Id"
          }
        },
        "required": [
          "id",
          "line_no",
          "line_date",
          "description",
          "amount",
          "transaction_id"
        ],
        "title": "BankStatementLineOut",
        "type": "object"
      },
      "BankStatementOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "closing": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The closing balance the file states, as the ledger reads it (OFX).",
            "title": "Closing"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "ends_on": {
            "description": "The last day a line is dated.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "format": {
            "description": "The file it came in: `csv` or `ofx`.",
            "title": "Format",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `stmt_`.",
            "examples": [
              "stmt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "stmt"
          },
          "lines": {
            "title": "Lines",
            "type": "integer"
          },
          "money_in": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Money In",
            "type": "string"
          },
          "money_out": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Money Out",
            "type": "string"
          },
          "opening": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opening"
          },
          "starts_on": {
            "description": "The first day a line is dated.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "status": {
            "description": "`imported`, or `reconciled` once a close relied on it.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "account_id",
          "starts_on",
          "ends_on",
          "opening",
          "closing",
          "currency",
          "format",
          "filename",
          "status",
          "lines",
          "money_in",
          "money_out",
          "created_at"
        ],
        "title": "BankStatementOut",
        "type": "object"
      },
      "BankStatementPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BankStatementOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "BankStatementPage",
        "type": "object"
      },
      "BillComparisonOut": {
        "properties": {
          "above_usual": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How much the bill comes to over the vendor's usual bill, when it is at least 1.25\u00d7 it: worth a look before it is approved or paid.",
            "title": "Above Usual"
          },
          "accounts": {
            "description": "Each account either bill charges, this bill's first in its line order; empty without a last bill.",
            "items": {
              "$ref": "#/components/schemas/AccountChangeOut"
            },
            "title": "Accounts",
            "type": "array"
          },
          "bill_id": {
            "description": "An id that starts with `bill_`.",
            "examples": [
              "bill_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Bill Id",
            "type": "string",
            "x-id-prefix": "bill"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "every_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between the vendor's bills, when it kept a rhythm as of the bill: 1, 3, 12.",
            "title": "Every Months"
          },
          "previous_bill": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PreviousBillOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor's bill before this one, in the same currency and not voided."
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "usual_amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the bill is measured against, when the vendor kept a rhythm as of the bill: the higher of its bills before this one in that rhythm (the two before it monthly or quarterly, last year's yearly).",
            "title": "Usual Amount"
          }
        },
        "required": [
          "bill_id",
          "currency",
          "total",
          "every_months",
          "usual_amount",
          "above_usual",
          "previous_bill",
          "accounts"
        ],
        "title": "BillComparisonOut",
        "type": "object"
      },
      "BillCreate": {
        "properties": {
          "bill_date": {
            "format": "date",
            "title": "Bill Date",
            "type": "string"
          },
          "document_id": {
            "anyOf": [
              {
                "description": "An id that starts with `doc_`.",
                "examples": [
                  "doc_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "doc"
              },
              {
                "type": "null"
              }
            ],
            "description": "The document it came in on, if any.",
            "title": "Document Id"
          },
          "due_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it falls due; the vendor's payment terms from the bill's day (30 days without) when left out.",
            "title": "Due Date"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/BillLineIn"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "description": "The vendor: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "vendor_number": {
            "description": "The vendor's own number for the bill; once per vendor in these books.",
            "maxLength": 64,
            "minLength": 1,
            "title": "Vendor Number",
            "type": "string"
          }
        },
        "required": [
          "party_id",
          "vendor_number",
          "bill_date",
          "lines"
        ],
        "title": "BillCreate",
        "type": "object"
      },
      "BillInboxOut": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where vendors send their bills. Null where this deployment does not receive email.",
            "title": "Address"
          }
        },
        "required": [
          "address"
        ],
        "title": "BillInboxOut",
        "type": "object"
      },
      "BillLineIn": {
        "properties": {
          "account_id": {
            "description": "The expense or asset account it is spent from.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "What it cost; negative for a credit on the bill.",
            "title": "Amount"
          },
          "description": {
            "description": "What the vendor charged for.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "service_end": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last day of the service it charges, if any.",
            "title": "Service End"
          },
          "service_start": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first day of the service it charges, if any.",
            "title": "Service Start"
          }
        },
        "required": [
          "description",
          "amount",
          "account_id"
        ],
        "title": "BillLineIn",
        "type": "object"
      },
      "BillLineOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "line_no": {
            "title": "Line No",
            "type": "integer"
          },
          "service_end": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service End"
          },
          "service_start": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Start"
          }
        },
        "required": [
          "line_no",
          "description",
          "amount",
          "account_id",
          "service_start",
          "service_end"
        ],
        "title": "BillLineOut",
        "type": "object"
      },
      "BillOut": {
        "properties": {
          "amount_due": {
            "description": "What is still owed to the vendor on it today; 0 for a draft or a void bill.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount Due",
            "type": "string"
          },
          "approved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by_ledgerit": {
            "description": "LedgerIt approved it, not a person: a usual bill that came to the bills address, from a vendor billing on a rhythm, within 5% of its usual, on the account of its last bill. While it is still fully owed, `send_back` returns it to a draft.",
            "title": "Approved By Ledgerit",
            "type": "boolean"
          },
          "bill_date": {
            "format": "date",
            "title": "Bill Date",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "document_id": {
            "anyOf": [
              {
                "description": "An id that starts with `doc_`.",
                "examples": [
                  "doc_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "doc"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Id"
          },
          "due_date": {
            "format": "date",
            "title": "Due Date",
            "type": "string"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry that put it on the books, once approved.",
            "title": "Entry Id"
          },
          "id": {
            "description": "An id that starts with `bill_`.",
            "examples": [
              "bill_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "bill"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/BillLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "row_version": {
            "title": "Row Version",
            "type": "integer"
          },
          "status": {
            "description": "`draft`, `approved` or `void`.",
            "title": "Status",
            "type": "string"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "vendor_number": {
            "title": "Vendor Number",
            "type": "string"
          },
          "void_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The reversal that took it off, once void.",
            "title": "Void Entry Id"
          },
          "voided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voided At"
          }
        },
        "required": [
          "id",
          "party_id",
          "vendor_number",
          "bill_date",
          "due_date",
          "currency",
          "total",
          "status",
          "amount_due",
          "document_id",
          "memo",
          "entry_id",
          "void_entry_id",
          "approved_at",
          "approved_by_ledgerit",
          "voided_at",
          "created_at",
          "row_version",
          "lines"
        ],
        "title": "BillOut",
        "type": "object"
      },
      "BillPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BillOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "BillPage",
        "type": "object"
      },
      "BillReadingOut": {
        "description": "What was read off a vendor's bill for the bill form (decision 0160).\nData only: a person checks every field before the bill is saved, and\nnothing read reaches the books on its own. A field read with a\nconfidence under 0.6 is not worth starting from.",
        "properties": {
          "bill_date": {
            "$ref": "#/components/schemas/ExtractedFieldOut",
            "description": "The bill's date, as YYYY-MM-DD."
          },
          "currency": {
            "$ref": "#/components/schemas/ExtractedFieldOut",
            "description": "The ISO 4217 code of the total."
          },
          "due_date": {
            "$ref": "#/components/schemas/ExtractedFieldOut",
            "description": "When it falls due, as YYYY-MM-DD, when the bill says."
          },
          "lines": {
            "description": "One per line item on the bill, in its order, at most 50.",
            "items": {
              "$ref": "#/components/schemas/ReadLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "The one counterparty in these books whose name is the vendor's, set aside case, punctuation and a legal suffix; null when none or several are.",
            "title": "Party Id"
          },
          "read": {
            "description": "Whether the document could be read as a bill at all.",
            "title": "Read",
            "type": "boolean"
          },
          "reader_version": {
            "description": "Which reader read it; the fields are comparable within one version.",
            "title": "Reader Version",
            "type": "string"
          },
          "tax": {
            "$ref": "#/components/schemas/ExtractedFieldOut",
            "description": "The tax included, as a plain number."
          },
          "total": {
            "$ref": "#/components/schemas/ExtractedFieldOut",
            "description": "The total due, tax included, as a plain number."
          },
          "vendor": {
            "$ref": "#/components/schemas/ExtractedFieldOut",
            "description": "Who sent the bill, as printed."
          },
          "vendor_number": {
            "$ref": "#/components/schemas/ExtractedFieldOut",
            "description": "The vendor's own number for the bill."
          }
        },
        "required": [
          "reader_version",
          "read",
          "vendor",
          "party_id",
          "vendor_number",
          "bill_date",
          "due_date",
          "total",
          "currency",
          "tax",
          "lines"
        ],
        "title": "BillReadingOut",
        "type": "object"
      },
      "BillUpdate": {
        "properties": {
          "bill_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bill Date"
          },
          "document_id": {
            "anyOf": [
              {
                "description": "An id that starts with `doc_`.",
                "examples": [
                  "doc_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "doc"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Id"
          },
          "due_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          },
          "lines": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BillLineIn"
                },
                "maxItems": 500,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Replaces every line when given.",
            "title": "Lines"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Id"
          },
          "vendor_number": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vendor Number"
          }
        },
        "title": "BillUpdate",
        "type": "object"
      },
      "BillVoid": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it is voided; written on the reversal.",
            "title": "Reason"
          }
        },
        "title": "BillVoid",
        "type": "object"
      },
      "BillingCadenceOut": {
        "description": "How often a vendor bills these books, learned from what it billed\n(decision 0152): its last bills fell exactly this many months apart.",
        "properties": {
          "every_months": {
            "description": "Months between its bills: 1, 3, 12 (monthly, quarterly, yearly).",
            "title": "Every Months",
            "type": "integer"
          },
          "next_expected_on": {
            "description": "When its next bill is due. In the past when it is late; the books' daily check asks about a late one so the month's cost can be accrued.",
            "format": "date",
            "title": "Next Expected On",
            "type": "string"
          },
          "usual_amount": {
            "description": "What a bill usually comes to, in the books' currency: the median of the bills that set its rhythm.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Usual Amount",
            "type": "string"
          },
          "usual_day": {
            "description": "The day of the month its bill usually lands.",
            "title": "Usual Day",
            "type": "integer"
          }
        },
        "required": [
          "every_months",
          "usual_day",
          "usual_amount",
          "next_expected_on"
        ],
        "title": "BillingCadenceOut",
        "type": "object"
      },
      "BillingOut": {
        "description": "What the organization behind these books pays for LedgerIt.",
        "properties": {
          "billing_period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`monthly` or `yearly`; null on Starter.",
            "title": "Billing Period"
          },
          "cancel_at_period_end": {
            "description": "The subscription is cancelled and ends at `current_period_end`.",
            "title": "Cancel At Period End",
            "type": "boolean"
          },
          "configured": {
            "description": "Whether this server can take payments at all. False means checkout and the portal will answer `billing_unconfigured`.",
            "title": "Configured",
            "type": "boolean"
          },
          "current_period_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the current paid period ends \u2014 the next renewal, the last day of service if `cancel_at_period_end`, or when service ended for a `canceled` subscription.",
            "title": "Current Period End"
          },
          "entities": {
            "description": "Sets of books the organization keeps.",
            "title": "Entities",
            "type": "integer"
          },
          "extra_entities": {
            "description": "Sets of books beyond the first the subscription bills.",
            "title": "Extra Entities",
            "type": "integer"
          },
          "has_customer": {
            "description": "Whether the organization has a Stripe customer, i.e. whether the billing portal can be opened.",
            "title": "Has Customer",
            "type": "boolean"
          },
          "offer": {
            "anyOf": [
              {
                "const": "yc_terms",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The offer the organization is owed through its referral: `yc_terms` (the YC offer, applied at checkout without a batch) for a fund's or an accelerator's company. Null for none.",
            "title": "Offer"
          },
          "paid": {
            "description": "True while the subscription is active or trialing.",
            "title": "Paid",
            "type": "boolean"
          },
          "pending_plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A plan the organization moves to after months over its ceiling.",
            "title": "Pending Plan"
          },
          "pending_plan_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The billing date that move takes effect on.",
            "title": "Pending Plan At"
          },
          "plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The plan the organization is on: `starter` without a subscription, else the subscription's (`founder`, `growth`, `scale`). Null for a subscription on a price that is no plan's.",
            "title": "Plan"
          },
          "referral": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReferralOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The partner the organization signed up through, or null (decision 0130)."
          },
          "required_plan": {
            "description": "The cheapest plan the monthly spend and the number of sets of books fit. Checkout sells it, or a bigger plan the owner chooses.",
            "title": "Required Plan",
            "type": "string"
          },
          "spend": {
            "$ref": "#/components/schemas/SpendOut"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Stripe subscription status (`active`, `trialing`, `past_due`, `canceled`, \u2026), or null if the organization has never subscribed.",
            "title": "Status"
          },
          "wholesale_rate": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Off a plan's list price, as a fraction (0.20 is 20%), for a firm's client. Not applied by checkout yet: firms' clients are billed by hand. Null for none.",
            "title": "Wholesale Rate"
          },
          "yc_offer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/YcOfferOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The YC offer, once a batch is given or when the organization came through a fund's or an accelerator's link."
          }
        },
        "required": [
          "configured",
          "plan",
          "billing_period",
          "required_plan",
          "entities",
          "extra_entities",
          "spend",
          "pending_plan",
          "pending_plan_at",
          "yc_offer",
          "referral",
          "offer",
          "wholesale_rate",
          "status",
          "paid",
          "current_period_end",
          "cancel_at_period_end",
          "has_customer"
        ],
        "title": "BillingOut",
        "type": "object"
      },
      "BlockerOut": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "count",
          "severity"
        ],
        "title": "BlockerOut",
        "type": "object"
      },
      "BoardPackChanges": {
        "description": "Only the fields sent change; an empty one, or null, clears it.",
        "properties": {
          "asks": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company asks of its board.",
            "title": "Asks"
          },
          "challenges": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What did not.",
            "title": "Challenges"
          },
          "highlights": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What went well this month.",
            "title": "Highlights"
          }
        },
        "title": "BoardPackChanges",
        "type": "object"
      },
      "BoardPackDetailOut": {
        "description": "A board pack with its figures and statements, each produced again from\nthe report its close kept.",
        "properties": {
          "asks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company asks of its board and investors.",
            "title": "Asks"
          },
          "balance_sheet": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BalanceSheetOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "As of the month's last day."
          },
          "cash_flow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CashFlowStatementOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "For the month."
          },
          "challenges": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What did not, and what is being done about it.",
            "title": "Challenges"
          },
          "close_run_id": {
            "description": "The close it was made from.",
            "examples": [
              "close_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Close Run Id",
            "type": "string",
            "x-id-prefix": "close_run"
          },
          "close_version": {
            "description": "Which close of the month: 1 for the first, 2 after a reopen.",
            "title": "Close Version",
            "type": "integer"
          },
          "closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When that close was signed off.",
            "title": "Closed At"
          },
          "created_at": {
            "description": "When the pack was opened.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "figures": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BoardPackFiguresOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cash, burn, runway, MRR, ARR, revenue and margin for the month."
          },
          "highlights": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What went well this month.",
            "title": "Highlights"
          },
          "id": {
            "description": "The pack's id.",
            "examples": [
              "board_pack_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "board_pack"
          },
          "income_statement": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IncomeStatementOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "For the month."
          },
          "period": {
            "description": "The month it reports, like 2026-09.",
            "title": "Period",
            "type": "string"
          },
          "report_run_ids": {
            "description": "The kept reports it is made of: its figures and its three statements.",
            "items": {
              "description": "An id that starts with `rpt_run_`.",
              "examples": [
                "rpt_run_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "rpt_run"
            },
            "title": "Report Run Ids",
            "type": "array"
          },
          "reproduces": {
            "description": "True when every figure is exactly what it was when the close kept it.",
            "title": "Reproduces",
            "type": "boolean"
          },
          "stands": {
            "description": "True while its close stands; false once the month was reopened, when the pack keeps the figures the board was given and a later close has its own pack.",
            "title": "Stands",
            "type": "boolean"
          },
          "through_sequence": {
            "description": "The posting sequence every figure in the pack reads through.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "updated_at": {
            "description": "When its commentary last changed.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who last wrote its commentary.",
            "title": "Updated By"
          },
          "updated_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their address, while they are a member of these books.",
            "title": "Updated By Email"
          }
        },
        "required": [
          "id",
          "period",
          "close_run_id",
          "close_version",
          "closed_at",
          "stands",
          "through_sequence",
          "highlights",
          "challenges",
          "asks",
          "updated_by",
          "updated_by_email",
          "report_run_ids",
          "created_at",
          "updated_at",
          "figures",
          "balance_sheet",
          "income_statement",
          "cash_flow",
          "reproduces"
        ],
        "title": "BoardPackDetailOut",
        "type": "object"
      },
      "BoardPackFiguresOut": {
        "description": "What a month's board pack says in figures, every one read from the\nbooks through the same posting sequence.",
        "properties": {
          "arr": {
            "description": "MRR times twelve.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Arr",
            "type": "string"
          },
          "burning": {
            "description": "True when the trailing net burn is above zero.",
            "title": "Burning",
            "type": "boolean"
          },
          "cash": {
            "description": "Cash across every cash account at the end of the month.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cash",
            "type": "string"
          },
          "currency": {
            "description": "The books' currency, as an ISO 4217 code.",
            "title": "Currency",
            "type": "string"
          },
          "gross_burn": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Operating cash that left in the month, as a positive figure. Null before the books began.",
            "title": "Gross Burn"
          },
          "gross_margin": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gross profit over revenue, as a fraction (0.9 = 90%); null with no revenue.",
            "title": "Gross Margin"
          },
          "months": {
            "description": "Burn for up to six complete months, oldest first, ending with this one; months before the books began are left out.",
            "items": {
              "$ref": "#/components/schemas/BurnMonthOut"
            },
            "title": "Months",
            "type": "array"
          },
          "mrr": {
            "description": "Subscription revenue recognized in the month, as Home reads it.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Mrr",
            "type": "string"
          },
          "mrr_month": {
            "description": "The month MRR is for: this one, by its first day.",
            "format": "date",
            "title": "Mrr Month",
            "type": "string"
          },
          "net_burn": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The month's gross burn less its operating inflows. Positive means more went out than came in.",
            "title": "Net Burn"
          },
          "net_income": {
            "description": "Net income in the month.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Income",
            "type": "string"
          },
          "operating_expenses": {
            "description": "Operating expenses in the month.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Operating Expenses",
            "type": "string"
          },
          "revenue": {
            "description": "Revenue in the month, from the income statement.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "type": "string"
          },
          "runway_months": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months of cash at the trailing net burn, to one decimal; null when not burning.",
            "title": "Runway Months"
          },
          "since": {
            "description": "The month's first day.",
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "trailing_months": {
            "description": "How many months `trailing_net_burn` averages.",
            "title": "Trailing Months",
            "type": "integer"
          },
          "trailing_net_burn": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Average net burn of the three complete months ending with this one: what runway divides by. The figure Home shows as net burn.",
            "title": "Trailing Net Burn"
          },
          "until": {
            "description": "The month's last day.",
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "since",
          "until",
          "currency",
          "cash",
          "gross_burn",
          "net_burn",
          "trailing_net_burn",
          "trailing_months",
          "burning",
          "runway_months",
          "mrr_month",
          "mrr",
          "arr",
          "revenue",
          "gross_margin",
          "operating_expenses",
          "net_income",
          "months"
        ],
        "title": "BoardPackFiguresOut",
        "type": "object"
      },
      "BoardPackOut": {
        "description": "A board pack: one close of one month, and what was written for the\nboard about it.",
        "properties": {
          "asks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company asks of its board and investors.",
            "title": "Asks"
          },
          "challenges": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What did not, and what is being done about it.",
            "title": "Challenges"
          },
          "close_run_id": {
            "description": "The close it was made from.",
            "examples": [
              "close_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Close Run Id",
            "type": "string",
            "x-id-prefix": "close_run"
          },
          "close_version": {
            "description": "Which close of the month: 1 for the first, 2 after a reopen.",
            "title": "Close Version",
            "type": "integer"
          },
          "closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When that close was signed off.",
            "title": "Closed At"
          },
          "created_at": {
            "description": "When the pack was opened.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "highlights": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What went well this month.",
            "title": "Highlights"
          },
          "id": {
            "description": "The pack's id.",
            "examples": [
              "board_pack_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "board_pack"
          },
          "period": {
            "description": "The month it reports, like 2026-09.",
            "title": "Period",
            "type": "string"
          },
          "report_run_ids": {
            "description": "The kept reports it is made of: its figures and its three statements.",
            "items": {
              "description": "An id that starts with `rpt_run_`.",
              "examples": [
                "rpt_run_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "rpt_run"
            },
            "title": "Report Run Ids",
            "type": "array"
          },
          "stands": {
            "description": "True while its close stands; false once the month was reopened, when the pack keeps the figures the board was given and a later close has its own pack.",
            "title": "Stands",
            "type": "boolean"
          },
          "through_sequence": {
            "description": "The posting sequence every figure in the pack reads through.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "updated_at": {
            "description": "When its commentary last changed.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who last wrote its commentary.",
            "title": "Updated By"
          },
          "updated_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their address, while they are a member of these books.",
            "title": "Updated By Email"
          }
        },
        "required": [
          "id",
          "period",
          "close_run_id",
          "close_version",
          "closed_at",
          "stands",
          "through_sequence",
          "highlights",
          "challenges",
          "asks",
          "updated_by",
          "updated_by_email",
          "report_run_ids",
          "created_at",
          "updated_at"
        ],
        "title": "BoardPackOut",
        "type": "object"
      },
      "BoardPackPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BoardPackOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "BoardPackPage",
        "type": "object"
      },
      "BooksArchive-Input": {
        "description": "Every entry in a set of books, with what they are posted to and the\ntrial balance they add up to.",
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/ArchiveAccount"
            },
            "title": "Accounts",
            "type": "array"
          },
          "checksum": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "sha256 of everything else, as `checksum_of` writes it. When present, a restore refuses an archive that no longer matches it.",
            "title": "Checksum"
          },
          "company": {
            "$ref": "#/components/schemas/ArchiveCompany"
          },
          "counterparties": {
            "items": {
              "$ref": "#/components/schemas/ArchiveCounterparty"
            },
            "title": "Counterparties",
            "type": "array"
          },
          "dimensions": {
            "items": {
              "$ref": "#/components/schemas/ArchiveDimension"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "entries": {
            "description": "In the order they were posted.",
            "items": {
              "$ref": "#/components/schemas/ArchiveEntry-Input"
            },
            "title": "Entries",
            "type": "array"
          },
          "exported_at": {
            "format": "date-time",
            "title": "Exported At",
            "type": "string"
          },
          "format": {
            "default": "ledgerit.books",
            "description": "Always `ledgerit.books`.",
            "title": "Format",
            "type": "string"
          },
          "through_sequence": {
            "description": "The last posting sequence the archive holds; 0 for none.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "trial_balance": {
            "$ref": "#/components/schemas/ArchiveTrialBalance-Input",
            "description": "What the entries add up to on the date of the last of them. A restore is undone unless the books it writes say the same."
          },
          "version": {
            "default": 1,
            "description": "The archive's shape. This API writes 1.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "exported_at",
          "through_sequence",
          "company",
          "accounts",
          "dimensions",
          "counterparties",
          "entries",
          "trial_balance"
        ],
        "title": "BooksArchive",
        "type": "object"
      },
      "BooksArchive-Output": {
        "description": "Every entry in a set of books, with what they are posted to and the\ntrial balance they add up to.",
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/ArchiveAccount"
            },
            "title": "Accounts",
            "type": "array"
          },
          "checksum": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "sha256 of everything else, as `checksum_of` writes it. When present, a restore refuses an archive that no longer matches it.",
            "title": "Checksum"
          },
          "company": {
            "$ref": "#/components/schemas/ArchiveCompany"
          },
          "counterparties": {
            "items": {
              "$ref": "#/components/schemas/ArchiveCounterparty"
            },
            "title": "Counterparties",
            "type": "array"
          },
          "dimensions": {
            "items": {
              "$ref": "#/components/schemas/ArchiveDimension"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "entries": {
            "description": "In the order they were posted.",
            "items": {
              "$ref": "#/components/schemas/ArchiveEntry-Output"
            },
            "title": "Entries",
            "type": "array"
          },
          "exported_at": {
            "format": "date-time",
            "title": "Exported At",
            "type": "string"
          },
          "format": {
            "default": "ledgerit.books",
            "description": "Always `ledgerit.books`.",
            "title": "Format",
            "type": "string"
          },
          "through_sequence": {
            "description": "The last posting sequence the archive holds; 0 for none.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "trial_balance": {
            "$ref": "#/components/schemas/ArchiveTrialBalance-Output",
            "description": "What the entries add up to on the date of the last of them. A restore is undone unless the books it writes say the same."
          },
          "version": {
            "default": 1,
            "description": "The archive's shape. This API writes 1.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "exported_at",
          "through_sequence",
          "company",
          "accounts",
          "dimensions",
          "counterparties",
          "entries",
          "trial_balance"
        ],
        "title": "BooksArchive",
        "type": "object"
      },
      "BooksAutonomyOut": {
        "description": "How much of the books' work ran without a person, month by month.",
        "properties": {
          "months": {
            "description": "One entry per month, oldest first.",
            "items": {
              "$ref": "#/components/schemas/AutonomyMonthOut"
            },
            "title": "Months",
            "type": "array"
          },
          "through": {
            "description": "The last month covered, as `YYYY-MM`.",
            "title": "Through",
            "type": "string"
          }
        },
        "required": [
          "through",
          "months"
        ],
        "title": "BooksAutonomyOut",
        "type": "object"
      },
      "BooksCheckList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BooksCheckOut"
            },
            "title": "Data",
            "type": "array"
          },
          "every_hours": {
            "description": "How often the checks run over every set of books.",
            "title": "Every Hours",
            "type": "integer"
          }
        },
        "required": [
          "data",
          "every_hours"
        ],
        "title": "BooksCheckList",
        "type": "object"
      },
      "BooksCheckOut": {
        "properties": {
          "ask_reason": {
            "description": "Why an item it raises needs a person.",
            "enum": [
              "needs_category",
              "needs_receipt",
              "needs_match",
              "needs_business_intent",
              "needs_approval",
              "data_problem"
            ],
            "title": "Ask Reason",
            "type": "string"
          },
          "kind": {
            "description": "The check, named by the kind of Inbox item it raises: `unusual_amount`, `stale_clearing`, `unmatched_transfer`, `possible_repeat`, `account_swing` or `missing_accrual`.",
            "enum": [
              "unusual_amount",
              "stale_clearing",
              "unmatched_transfer",
              "possible_repeat",
              "account_swing",
              "missing_accrual"
            ],
            "title": "Kind",
            "type": "string"
          },
          "thresholds": {
            "description": "What a finding is held to.",
            "items": {
              "$ref": "#/components/schemas/ThresholdOut"
            },
            "title": "Thresholds",
            "type": "array"
          },
          "tolerable": {
            "description": "Whether a vendor's tolerance can widen it (`/qa_tolerances`): true for the checks about one vendor.",
            "title": "Tolerable",
            "type": "boolean"
          }
        },
        "required": [
          "kind",
          "ask_reason",
          "tolerable",
          "thresholds"
        ],
        "title": "BooksCheckOut",
        "type": "object"
      },
      "BooksDigestOut": {
        "description": "This week's digest, as the books stand now.",
        "properties": {
          "autonomy": {
            "$ref": "#/components/schemas/DigestAutonomyOut",
            "description": "How much of last month ran without a person."
          },
          "current_month": {
            "$ref": "#/components/schemas/DigestMonthOut",
            "description": "This month, so far."
          },
          "id": {
            "anyOf": [
              {
                "description": "An id that starts with `digest_`.",
                "examples": [
                  "digest_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "digest"
              },
              {
                "type": "null"
              }
            ],
            "description": "This week's sent digest, or null while it has not gone out.",
            "title": "Id"
          },
          "previous_month": {
            "$ref": "#/components/schemas/DigestMonthOut",
            "description": "Last month: closed, or how ready it is."
          },
          "reviewing": {
            "description": "The newest 5 of them.",
            "items": {
              "$ref": "#/components/schemas/DigestReviewingOut"
            },
            "title": "Reviewing",
            "type": "array"
          },
          "reviewing_count": {
            "description": "Open findings of the daily books checks: what we are reviewing.",
            "title": "Reviewing Count",
            "type": "integer"
          },
          "runway": {
            "$ref": "#/components/schemas/DigestRunwayOut",
            "description": "Cash and runway."
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When this week's digest went out, or null while it has not. It goes out on Monday in the company's time zone, once a week.",
            "title": "Sent At"
          },
          "timezone": {
            "description": "The IANA time zone the week is read in: the company's (`PATCH /company`), or UTC.",
            "title": "Timezone",
            "type": "string"
          },
          "week": {
            "description": "The ISO week, as `2026-W40`, on the company's clock.",
            "title": "Week",
            "type": "string"
          },
          "week_starts_on": {
            "description": "The week's Monday.",
            "format": "date",
            "title": "Week Starts On",
            "type": "string"
          }
        },
        "required": [
          "id",
          "week",
          "week_starts_on",
          "timezone",
          "sent_at",
          "previous_month",
          "current_month",
          "autonomy",
          "runway",
          "reviewing_count",
          "reviewing"
        ],
        "title": "BooksDigestOut",
        "type": "object"
      },
      "BooksReadinessOut": {
        "properties": {
          "amount_open": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What is at stake in the month: the transactions behind every area in attention, each counted once however many areas name it, in `currency`. Null unless every area in attention has an `amount`, so it is never a whole that leaves work out. Like the areas' amounts, it includes earlier months' open work.",
            "title": "Amount Open"
          },
          "areas": {
            "description": "Each area of the books, always all nine, in the order a month shows them.",
            "items": {
              "$ref": "#/components/schemas/ReadinessAreaOut"
            },
            "title": "Areas",
            "type": "array"
          },
          "blockers": {
            "description": "What stands in the way of the close: the same list the close screen shows.",
            "items": {
              "$ref": "#/components/schemas/ReadinessBlockerOut"
            },
            "title": "Blockers",
            "type": "array"
          },
          "can_close": {
            "description": "Whether closing the month would succeed without an override: exactly what the close screen says.",
            "title": "Can Close",
            "type": "boolean"
          },
          "currency": {
            "description": "The books' currency, ISO 4217, that every amount is in.",
            "title": "Currency",
            "type": "string"
          },
          "ends_on": {
            "description": "The month's last day.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "needs_person": {
            "description": "The sum of the counts of the areas in attention.",
            "title": "Needs Person",
            "type": "integer"
          },
          "percent": {
            "description": "How much of the month's work is done, 0 to 100 to one place: `units_done` of `units_total`, rounded down. 100 does not mean the month may close: it may not have ended, or an earlier month may be open (see `can_close`).",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Percent",
            "type": "string"
          },
          "period_key": {
            "description": "The month, as `2026-09`.",
            "title": "Period Key",
            "type": "string"
          },
          "period_status": {
            "description": "`open`, `soft_closed` or `locked`.",
            "title": "Period Status",
            "type": "string"
          },
          "starts_on": {
            "description": "The month's first day.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "units_done": {
            "description": "Units of the month's work done.",
            "title": "Units Done",
            "type": "integer"
          },
          "units_total": {
            "description": "Units of the month's work: its transactions (and earlier ones still undecided), the accounts with a statement, the blocking checklist tasks, the account reviews, the connections that must be current, each open blocking exception, and the trial balance.",
            "title": "Units Total",
            "type": "integer"
          }
        },
        "required": [
          "period_key",
          "starts_on",
          "ends_on",
          "period_status",
          "percent",
          "units_done",
          "units_total",
          "needs_person",
          "currency",
          "amount_open",
          "can_close",
          "blockers",
          "areas"
        ],
        "title": "BooksReadinessOut",
        "type": "object"
      },
      "BudgetChange": {
        "properties": {
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A new memo; null clears it.",
            "title": "Memo"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A new name.",
            "title": "Name"
          }
        },
        "title": "BudgetChange",
        "type": "object"
      },
      "BudgetComparisonOut": {
        "properties": {
          "actual_through": {
            "description": "The last day whose actuals are counted.",
            "format": "date",
            "title": "Actual Through",
            "type": "string"
          },
          "budget": {
            "$ref": "#/components/schemas/BudgetOut"
          },
          "department_rows": {
            "description": "Departments budgeted on their own: their operating expenses on any account. Not in the totals.",
            "items": {
              "$ref": "#/components/schemas/ComparisonRowOut"
            },
            "title": "Department Rows",
            "type": "array"
          },
          "months": {
            "description": "The first day of each month, in order.",
            "items": {
              "format": "date",
              "type": "string"
            },
            "title": "Months",
            "type": "array"
          },
          "net_actual": {
            "description": "Actual income less expense through `actual_through`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Actual",
            "type": "string"
          },
          "net_budget": {
            "description": "Budgeted income less expense through `actual_through`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Budget",
            "type": "string"
          },
          "rows": {
            "description": "Accounts, and their parts by department, by section.",
            "items": {
              "$ref": "#/components/schemas/ComparisonRowOut"
            },
            "title": "Rows",
            "type": "array"
          }
        },
        "required": [
          "budget",
          "months",
          "actual_through",
          "rows",
          "department_rows",
          "net_budget",
          "net_actual"
        ],
        "title": "BudgetComparisonOut",
        "type": "object"
      },
      "BudgetCreate": {
        "properties": {
          "copy_from_budget_id": {
            "anyOf": [
              {
                "description": "An id that starts with `budget_`.",
                "examples": [
                  "budget_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "budget"
              },
              {
                "type": "null"
              }
            ],
            "description": "The budget to copy when `start` is `copy`.",
            "title": "Copy From Budget Id"
          },
          "fiscal_year": {
            "description": "The fiscal year, named for the calendar year it ends in.",
            "maximum": 2200.0,
            "minimum": 1900.0,
            "title": "Fiscal Year",
            "type": "integer"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "name": {
            "description": "What to call it.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scenario": {
            "default": "base",
            "description": "`base`, `upside` or `downside`.",
            "enum": [
              "base",
              "upside",
              "downside"
            ],
            "title": "Scenario",
            "type": "string"
          },
          "start": {
            "default": "blank",
            "description": "`blank`; `copy` the lines of `copy_from_budget_id`, moved to this year's months; or `last_year_actuals`, each account's actual for the same month a year earlier.",
            "enum": [
              "blank",
              "copy",
              "last_year_actuals"
            ],
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "name",
          "fiscal_year"
        ],
        "title": "BudgetCreate",
        "type": "object"
      },
      "BudgetDetailOut": {
        "properties": {
          "copied_from_id": {
            "anyOf": [
              {
                "description": "An id that starts with `budget_`.",
                "examples": [
                  "budget_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "budget"
              },
              {
                "type": "null"
              }
            ],
            "description": "The budget it was copied from, if any.",
            "title": "Copied From Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "fiscal_year": {
            "description": "The fiscal year it plans, named for the calendar year it ends in.",
            "title": "Fiscal Year",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `budget_`.",
            "examples": [
              "budget_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "budget"
          },
          "lines": {
            "description": "Every budgeted cell.",
            "items": {
              "$ref": "#/components/schemas/BudgetLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "months": {
            "description": "How many months it covers, from `starts_on`.",
            "title": "Months",
            "type": "integer"
          },
          "name": {
            "description": "What it is called, e.g. `FY2027 plan`.",
            "title": "Name",
            "type": "string"
          },
          "row_version": {
            "description": "Send it back as `expected_row_version` when setting lines.",
            "title": "Row Version",
            "type": "integer"
          },
          "scenario": {
            "description": "`base`, `upside` or `downside`.",
            "enum": [
              "base",
              "upside",
              "downside"
            ],
            "title": "Scenario",
            "type": "string"
          },
          "starts_on": {
            "description": "The first day of its first month.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "status": {
            "description": "`current` is the version budget vs. actual reads; `draft` is being worked on; `superseded` was current once and no longer changes.",
            "enum": [
              "draft",
              "current",
              "superseded"
            ],
            "title": "Status",
            "type": "string"
          },
          "total_expense": {
            "description": "Budgeted expense across its months.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Expense",
            "type": "string"
          },
          "total_income": {
            "description": "Budgeted income across its months.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Income",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "description": "Its version within its year and scenario, from 1.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "fiscal_year",
          "starts_on",
          "months",
          "scenario",
          "version",
          "status",
          "copied_from_id",
          "total_income",
          "total_expense",
          "row_version",
          "created_at",
          "updated_at",
          "lines"
        ],
        "title": "BudgetDetailOut",
        "type": "object"
      },
      "BudgetLineIn": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "A postable income or expense account.",
            "title": "Account Id"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "Signed the way the P&L reads: income and expense both positive.",
            "title": "Amount"
          },
          "department_value_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "A value of the books' department dimension.",
            "title": "Department Value Id"
          },
          "month": {
            "description": "The first day of one of the budget's months.",
            "format": "date",
            "title": "Month",
            "type": "string"
          }
        },
        "required": [
          "month",
          "amount"
        ],
        "title": "BudgetLineIn",
        "type": "object"
      },
      "BudgetLineOut": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The income or expense account, or null for a department's line.",
            "title": "Account Id"
          },
          "amount": {
            "description": "Signed the way the P&L reads: income and expense both positive.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "department_value_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department, or null for the whole account.",
            "title": "Department Value Id"
          },
          "month": {
            "description": "The first day of the month.",
            "format": "date",
            "title": "Month",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "department_value_id",
          "month",
          "amount"
        ],
        "title": "BudgetLineOut",
        "type": "object"
      },
      "BudgetLinesIn": {
        "properties": {
          "expected_row_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The budget's `row_version` as you read it; refused with `budget_changed` if it moved on.",
            "title": "Expected Row Version"
          },
          "lines": {
            "description": "Every cell; the rest are removed.",
            "items": {
              "$ref": "#/components/schemas/BudgetLineIn"
            },
            "maxItems": 5000,
            "title": "Lines",
            "type": "array"
          }
        },
        "required": [
          "lines"
        ],
        "title": "BudgetLinesIn",
        "type": "object"
      },
      "BudgetOut": {
        "properties": {
          "copied_from_id": {
            "anyOf": [
              {
                "description": "An id that starts with `budget_`.",
                "examples": [
                  "budget_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "budget"
              },
              {
                "type": "null"
              }
            ],
            "description": "The budget it was copied from, if any.",
            "title": "Copied From Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "fiscal_year": {
            "description": "The fiscal year it plans, named for the calendar year it ends in.",
            "title": "Fiscal Year",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `budget_`.",
            "examples": [
              "budget_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "budget"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "months": {
            "description": "How many months it covers, from `starts_on`.",
            "title": "Months",
            "type": "integer"
          },
          "name": {
            "description": "What it is called, e.g. `FY2027 plan`.",
            "title": "Name",
            "type": "string"
          },
          "row_version": {
            "description": "Send it back as `expected_row_version` when setting lines.",
            "title": "Row Version",
            "type": "integer"
          },
          "scenario": {
            "description": "`base`, `upside` or `downside`.",
            "enum": [
              "base",
              "upside",
              "downside"
            ],
            "title": "Scenario",
            "type": "string"
          },
          "starts_on": {
            "description": "The first day of its first month.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "status": {
            "description": "`current` is the version budget vs. actual reads; `draft` is being worked on; `superseded` was current once and no longer changes.",
            "enum": [
              "draft",
              "current",
              "superseded"
            ],
            "title": "Status",
            "type": "string"
          },
          "total_expense": {
            "description": "Budgeted expense across its months.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Expense",
            "type": "string"
          },
          "total_income": {
            "description": "Budgeted income across its months.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Income",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "description": "Its version within its year and scenario, from 1.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "fiscal_year",
          "starts_on",
          "months",
          "scenario",
          "version",
          "status",
          "copied_from_id",
          "total_income",
          "total_expense",
          "row_version",
          "created_at",
          "updated_at"
        ],
        "title": "BudgetOut",
        "type": "object"
      },
      "BudgetPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BudgetOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "BudgetPage",
        "type": "object"
      },
      "BurnAndRunwayOut": {
        "properties": {
          "as_of": {
            "description": "The day the figures are read as of.",
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "burning": {
            "description": "True when the trailing net burn is above zero.",
            "title": "Burning",
            "type": "boolean"
          },
          "cash": {
            "description": "Cash across every cash account at the end of `as_of`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cash",
            "type": "string"
          },
          "currency": {
            "description": "The books' currency, as an ISO 4217 code.",
            "title": "Currency",
            "type": "string"
          },
          "months": {
            "description": "Oldest first; the last is the current month to date.",
            "items": {
              "$ref": "#/components/schemas/BurnMonthOut"
            },
            "title": "Months",
            "type": "array"
          },
          "runway_months": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months of cash at the trailing net burn, to one decimal. Null when the company is not burning.",
            "title": "Runway Months"
          },
          "trailing_months": {
            "description": "How many complete months `trailing_net_burn` averages.",
            "title": "Trailing Months",
            "type": "integer"
          },
          "trailing_net_burn": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Average net burn of the last complete months (up to three), or null with no complete month yet.",
            "title": "Trailing Net Burn"
          }
        },
        "required": [
          "as_of",
          "currency",
          "cash",
          "months",
          "trailing_net_burn",
          "trailing_months",
          "burning",
          "runway_months"
        ],
        "title": "BurnAndRunwayOut",
        "type": "object"
      },
      "BurnMonthOut": {
        "properties": {
          "complete": {
            "description": "False for the current month, which is month to date.",
            "title": "Complete",
            "type": "boolean"
          },
          "gross_burn": {
            "description": "Operating cash that left in the month, as a positive figure.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Gross Burn",
            "type": "string"
          },
          "month": {
            "description": "The first day of the month.",
            "format": "date",
            "title": "Month",
            "type": "string"
          },
          "net_burn": {
            "description": "Gross burn less operating inflows. Positive means more went out than came in.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Burn",
            "type": "string"
          },
          "operating_inflows": {
            "description": "Operating cash that came in during the month, as a positive figure.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Operating Inflows",
            "type": "string"
          }
        },
        "required": [
          "month",
          "gross_burn",
          "operating_inflows",
          "net_burn",
          "complete"
        ],
        "title": "BurnMonthOut",
        "type": "object"
      },
      "CalendarDay": {
        "properties": {
          "count": {
            "description": "Contributions that counted that day.",
            "title": "Count",
            "type": "integer"
          },
          "date": {
            "format": "date",
            "title": "Date",
            "type": "string"
          }
        },
        "required": [
          "date",
          "count"
        ],
        "title": "CalendarDay",
        "type": "object"
      },
      "CapitalOptionList": {
        "properties": {
          "data": {
            "description": "Best first. Empty when the transaction cannot be one: not plain money in or out, a hold, or matched.",
            "items": {
              "$ref": "#/components/schemas/CapitalOptionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "ownership": {
            "description": "Who owns the company, as its legal structure says: `shareholders` (a corporation, and when it is not known), `members` (an LLC or a partnership) or `owner` (a sole proprietorship). It decides the purposes offered.",
            "enum": [
              "shareholders",
              "members",
              "owner"
            ],
            "title": "Ownership",
            "type": "string"
          }
        },
        "required": [
          "ownership",
          "data"
        ],
        "title": "CapitalOptionList",
        "type": "object"
      },
      "CapitalOptionOut": {
        "description": "One thing a transaction may be as money between the company and those\nwho fund it, and what picking it does.",
        "properties": {
          "account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Code"
          },
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "`capital`: the account it files to, null until it is opened on first use. `financing`, `intercompany`: the account the entry moved.",
            "title": "Account Id"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Name"
          },
          "counterparty_entity_id": {
            "anyOf": [
              {
                "description": "An id that starts with `ent_`.",
                "examples": [
                  "ent_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "ent"
              },
              {
                "type": "null"
              }
            ],
            "description": "The other company.",
            "title": "Counterparty Entity Id"
          },
          "counterparty_entity_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Entity Name"
          },
          "entry_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry's date, or the draft's issue date.",
            "title": "Entry Date"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry holding its cash.",
            "title": "Entry Id"
          },
          "financing_kind": {
            "anyOf": [
              {
                "enum": [
                  "issued",
                  "repaid"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`financing`: whether the entry issued the instrument or repaid it.",
            "title": "Financing Kind"
          },
          "instrument_id": {
            "anyOf": [
              {
                "description": "An id that starts with `fin_`.",
                "examples": [
                  "fin_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "fin"
              },
              {
                "type": "null"
              }
            ],
            "description": "The instrument.",
            "title": "Instrument Id"
          },
          "instrument_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Name"
          },
          "intercompany_transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `ic_`.",
                "examples": [
                  "ic_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "ic"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intercompany Transaction Id"
          },
          "kind": {
            "description": "`capital`: file it for `purpose` under the owner account it names (`transactions.file_as_owner_money`). `financing`: it is the bank's side of an instrument's entry already in the books (`transactions.link_cash` with `entry_id`). `financing_draft`: issue the draft instrument from it (`transactions.link_cash` with `financing_instrument_id`). `intercompany`: the bank's side of an intercompany transaction's entry (`transactions.link_cash` with `entry_id`). `new_intercompany`: record it as intercompany with `counterparty_entity_id` (`transactions.link_cash` with `counterparty_entity_id`).",
            "enum": [
              "capital",
              "financing",
              "financing_draft",
              "intercompany",
              "new_intercompany"
            ],
            "title": "Kind",
            "type": "string"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the money is with, when the books know: the instrument's investor, or the founder or investor the transaction names.",
            "title": "Party Id"
          },
          "party_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Name"
          },
          "purpose": {
            "anyOf": [
              {
                "enum": [
                  "owner_loan",
                  "stock_purchase",
                  "contribution",
                  "owner_loan_repayment",
                  "distribution"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`capital`: `owner_loan`, `stock_purchase`, `contribution`, `owner_loan_repayment` or `distribution`, as the books' owners have them.",
            "title": "Purpose"
          },
          "reasons": {
            "description": "Why it is suggested; empty when nothing points at it.",
            "items": {
              "$ref": "#/components/schemas/SuggestionReasonOut"
            },
            "title": "Reasons",
            "type": "array"
          },
          "score": {
            "description": "0 to 1, deterministic. An entry already in the books for its amount scores highest: filing the transaction anywhere else counts that cash twice. 0 when nothing points at it; it is listed all the same.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Score",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "score",
          "reasons"
        ],
        "title": "CapitalOptionOut",
        "type": "object"
      },
      "Capitalize": {
        "description": "Equipment bought with this transaction, and how it depreciates.",
        "properties": {
          "asset_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The asset account it is filed to; 1600 Computer equipment when left out.",
            "title": "Asset Account Id"
          },
          "department_value_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department its depreciation is expensed to; the transaction's own department when left out, and none when it names none.",
            "title": "Department Value Id"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it is, e.g. `MacBook Pro, Ana`; the transaction's description when left out.",
            "title": "Name"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why, kept on the filing and in the audit trail.",
            "title": "Note"
          },
          "placed_in_service_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it went into use; the transaction's date when left out.",
            "title": "Placed In Service On"
          },
          "salvage_value": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "description": "What it will be worth at the end; less than its cost.",
            "title": "Salvage Value"
          },
          "useful_life_months": {
            "default": 36,
            "description": "How many months it lasts; 36, a laptop's, when left out.",
            "maximum": 1200.0,
            "minimum": 1.0,
            "title": "Useful Life Months",
            "type": "integer"
          }
        },
        "title": "Capitalize",
        "type": "object"
      },
      "CardholderContactCreate": {
        "properties": {
          "email": {
            "description": "Their address.",
            "maxLength": 320,
            "minLength": 3,
            "pattern": "^[^@\\s]+@[^@\\s]+$",
            "title": "Email",
            "type": "string"
          },
          "name": {
            "description": "The cardholder, as the card program names them.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "email"
        ],
        "title": "CardholderContactCreate",
        "type": "object"
      },
      "CardholderContactOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who gave the address.",
            "title": "Created By"
          },
          "email": {
            "description": "Where their receipt requests go.",
            "title": "Email",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `cardholder_`.",
            "examples": [
              "cardholder_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "cardholder"
          },
          "name": {
            "description": "The cardholder as the card program names them.",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "created_by",
          "created_at"
        ],
        "title": "CardholderContactOut",
        "type": "object"
      },
      "CardholderContactPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CardholderContactOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CardholderContactPage",
        "type": "object"
      },
      "CardholderContactUpdate": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 3,
                "pattern": "^[^@\\s]+@[^@\\s]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "CardholderContactUpdate",
        "type": "object"
      },
      "CardholderIdentityCreate": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 3,
                "pattern": "^[^@\\s]+@[^@\\s]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "source": {
            "description": "The card program: `brex`, `ramp`.",
            "maxLength": 64,
            "minLength": 1,
            "title": "Source",
            "type": "string"
          },
          "source_ref": {
            "description": "The card program's own id for the person.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Source Ref",
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member of these books they are.",
            "title": "User Id"
          }
        },
        "required": [
          "source",
          "source_ref"
        ],
        "title": "CardholderIdentityCreate",
        "type": "object"
      },
      "CardholderIdentityOut": {
        "properties": {
          "connection_id": {
            "anyOf": [
              {
                "description": "An id that starts with `conn_`.",
                "examples": [
                  "conn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "conn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The connection that read them last.",
            "title": "Connection Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their address, as the card program gives it. Null when it gives none, or the connection may not read its people.",
            "title": "Email"
          },
          "fetched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the card program's directory was last read for them; null when only a charge named them.",
            "title": "Fetched At"
          },
          "id": {
            "description": "An id that starts with `cardholder_identity_`.",
            "examples": [
              "cardholder_identity_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "cardholder_identity"
          },
          "last_seen_at": {
            "description": "When a sync last saw them named.",
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "linked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When they were linked to a member.",
            "title": "Linked At"
          },
          "linked_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who said which member they are. Null when nobody did, or that person has gone.",
            "title": "Linked By"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their name, as the card program gives it.",
            "title": "Name"
          },
          "not_me": {
            "description": "The members who said this person is not them (\"Not me\"), in the order they said it. None of them is asked about the person again.",
            "items": {
              "description": "An id that starts with `usr_`.",
              "examples": [
                "usr_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "usr"
            },
            "title": "Not Me",
            "type": "array"
          },
          "payload": {
            "additionalProperties": true,
            "description": "What the card program said about the person, whole and verbatim: every id and field.",
            "title": "Payload",
            "type": "object"
          },
          "source": {
            "description": "The card program that names them: `brex`, `ramp`.",
            "title": "Source",
            "type": "string"
          },
          "source_ref": {
            "description": "The card program's own id for the person.",
            "title": "Source Ref",
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member of these books they are; null while unknown.",
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "source",
          "source_ref",
          "name",
          "email",
          "user_id",
          "linked_by",
          "linked_at",
          "payload",
          "fetched_at",
          "connection_id",
          "not_me",
          "created_at",
          "last_seen_at"
        ],
        "title": "CardholderIdentityOut",
        "type": "object"
      },
      "CardholderIdentityPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CardholderIdentityOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CardholderIdentityPage",
        "type": "object"
      },
      "CardholderIdentityUpdate": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 3,
                "pattern": "^[^@\\s]+@[^@\\s]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "user_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member of these books they are, or null to say the books do not know. Left out, unchanged.",
            "title": "User Id"
          }
        },
        "title": "CardholderIdentityUpdate",
        "type": "object"
      },
      "CashFlowLineOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "amount"
        ],
        "title": "CashFlowLineOut",
        "type": "object"
      },
      "CashFlowSectionOut": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/CashFlowLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "key",
          "name",
          "lines",
          "total"
        ],
        "title": "CashFlowSectionOut",
        "type": "object"
      },
      "CashFlowStatementOut": {
        "properties": {
          "balanced": {
            "title": "Balanced",
            "type": "boolean"
          },
          "beginning_cash": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Beginning Cash",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "difference": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "ending_cash": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Ending Cash",
            "type": "string"
          },
          "net_change": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Change",
            "type": "string"
          },
          "net_income": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Income",
            "type": "string"
          },
          "sections": {
            "items": {
              "$ref": "#/components/schemas/CashFlowSectionOut"
            },
            "title": "Sections",
            "type": "array"
          },
          "since": {
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "until": {
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "since",
          "until",
          "currency",
          "net_income",
          "sections",
          "net_change",
          "beginning_cash",
          "ending_cash",
          "balanced",
          "difference"
        ],
        "title": "CashFlowStatementOut",
        "type": "object"
      },
      "CategorizationOut": {
        "properties": {
          "account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That account's code.",
            "title": "Account Code"
          },
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account it was filed to; null for none.",
            "title": "Account Id"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That account's name.",
            "title": "Account Name"
          },
          "confidence": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "current": {
            "description": "Whether this is the decision that stands.",
            "title": "Current",
            "type": "boolean"
          },
          "decided_by": {
            "enum": [
              "default",
              "rule",
              "model",
              "human"
            ],
            "title": "Decided By",
            "type": "string"
          },
          "dimensions": {
            "description": "The department and other dimension values it named, as they stood; empty when none.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "id": {
            "description": "An id that starts with `cat_`.",
            "examples": [
              "cat_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "cat"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who it was with, as decided then.",
            "title": "Party Id"
          },
          "party_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That counterparty's name today; null when none or gone.",
            "title": "Party Name"
          },
          "rationale": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why: the rule, the model's words, or the person.",
            "title": "Rationale"
          },
          "reason": {
            "$ref": "#/components/schemas/FilingReasonOut",
            "description": "The same, as its kind and the parts to show."
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          },
          "splits": {
            "description": "The parts it was split into, as they stood; empty when filed whole.",
            "items": {
              "$ref": "#/components/schemas/CategorizedSplitOut"
            },
            "title": "Splits",
            "type": "array"
          },
          "version": {
            "description": "1 for the first decision, counting up.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "version",
          "account_id",
          "party_id",
          "decided_by",
          "confidence",
          "rationale",
          "reason",
          "current",
          "recorded_at"
        ],
        "title": "CategorizationOut",
        "type": "object"
      },
      "CategorizationPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CategorizationOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CategorizationPage",
        "type": "object"
      },
      "Categorize": {
        "properties": {
          "category_account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "post": {
            "default": true,
            "title": "Post",
            "type": "boolean"
          }
        },
        "required": [
          "category_account_id"
        ],
        "title": "Categorize",
        "type": "object"
      },
      "CategorizeMany": {
        "properties": {
          "category_account_id": {
            "description": "The GL account all of them are filed to.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "event_ids": {
            "description": "The transactions to file, each at most once.",
            "items": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "txn"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Event Ids",
            "type": "array"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "post": {
            "default": true,
            "title": "Post",
            "type": "boolean"
          }
        },
        "required": [
          "event_ids",
          "category_account_id"
        ],
        "title": "CategorizeMany",
        "type": "object"
      },
      "CategorizeManyOut": {
        "properties": {
          "filed": {
            "description": "The transactions filed, as they now stand.",
            "items": {
              "$ref": "#/components/schemas/TransactionOut"
            },
            "title": "Filed",
            "type": "array"
          },
          "refused": {
            "description": "The ones left as they were. One refusal does not stop the rest.",
            "items": {
              "$ref": "#/components/schemas/FilingRefusal"
            },
            "title": "Refused",
            "type": "array"
          }
        },
        "required": [
          "filed",
          "refused"
        ],
        "title": "CategorizeManyOut",
        "type": "object"
      },
      "CategorizeRequest": {
        "properties": {
          "event_ids": {
            "anyOf": [
              {
                "items": {
                  "description": "An id that starts with `txn_`.",
                  "examples": [
                    "txn_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "txn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Ids"
          },
          "use_model": {
            "default": true,
            "title": "Use Model",
            "type": "boolean"
          }
        },
        "title": "CategorizeRequest",
        "type": "object"
      },
      "CategorizeResponse": {
        "properties": {
          "by_model": {
            "title": "By Model",
            "type": "integer"
          },
          "by_rule": {
            "title": "By Rule",
            "type": "integer"
          },
          "considered": {
            "title": "Considered",
            "type": "integer"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "title": "Errors",
            "type": "array"
          },
          "model_needs_review": {
            "title": "Model Needs Review",
            "type": "integer"
          },
          "model_unavailable": {
            "title": "Model Unavailable",
            "type": "boolean"
          },
          "to_suspense": {
            "title": "To Suspense",
            "type": "integer"
          }
        },
        "required": [
          "considered",
          "by_rule",
          "by_model",
          "model_needs_review",
          "to_suspense",
          "model_unavailable",
          "errors"
        ],
        "title": "CategorizeResponse",
        "type": "object"
      },
      "CategorizedSplitOut": {
        "properties": {
          "account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Code"
          },
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account this part was filed to.",
            "title": "Account Id"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Name"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          }
        },
        "required": [
          "account_id",
          "amount",
          "memo"
        ],
        "title": "CategorizedSplitOut",
        "type": "object"
      },
      "CategoryCount": {
        "properties": {
          "category": {
            "enum": [
              "transactions",
              "reconciliation",
              "journal",
              "close",
              "review",
              "rules",
              "records"
            ],
            "title": "Category",
            "type": "string"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "category",
          "count"
        ],
        "title": "CategoryCount",
        "type": "object"
      },
      "CategoryPreference": {
        "properties": {
          "key": {
            "description": "A group of kinds of notification, as Settings groups them.",
            "enum": [
              "connections",
              "review",
              "receipts",
              "close",
              "team",
              "discussion",
              "digest"
            ],
            "title": "Key",
            "type": "string"
          },
          "muted": {
            "description": "True when every kind in it reaches the caller nowhere in these books. Setting it false puts each of its kinds back on its default channels.",
            "title": "Muted",
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "muted"
        ],
        "title": "CategoryPreference",
        "type": "object"
      },
      "ChangeOut": {
        "properties": {
          "after": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it is; null for nothing.",
            "title": "After"
          },
          "before": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it was; null for nothing.",
            "title": "Before"
          },
          "field": {
            "description": "What changed: `category`, `counterparty`, or a field's own name.",
            "title": "Field",
            "type": "string"
          }
        },
        "required": [
          "field"
        ],
        "title": "ChangeOut",
        "type": "object"
      },
      "ChartOut": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/AccountOut"
            },
            "title": "Accounts",
            "type": "array"
          },
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "minor_unit_scale": {
            "description": "How many decimal places the books' currency is counted in: 2 for dollars, 0 for yen. Every amount posted to these books is a whole number of that unit.",
            "title": "Minor Unit Scale",
            "type": "integer"
          }
        },
        "required": [
          "as_of",
          "currency",
          "minor_unit_scale",
          "accounts"
        ],
        "title": "ChartOut",
        "type": "object"
      },
      "ChecklistItemOut": {
        "description": "One task as one month's close asks for it.",
        "properties": {
          "assignee_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The owner's address in these books, when there is an owner.",
            "title": "Assignee Email"
          },
          "assignee_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who does it, or null.",
            "title": "Assignee Id"
          },
          "blocking": {
            "description": "Whether the month's close waits on it.",
            "title": "Blocking",
            "type": "boolean"
          },
          "close_task_id": {
            "anyOf": [
              {
                "description": "An id that starts with `run_task_`.",
                "examples": [
                  "run_task_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "run_task"
              },
              {
                "type": "null"
              }
            ],
            "description": "This month's close run's own copy of the task. Null while the month's close has not started.",
            "title": "Close Task Id"
          },
          "depends_on_ids": {
            "description": "The tasks it waits on, by `task_id`.",
            "items": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "task"
            },
            "title": "Depends On Ids",
            "type": "array"
          },
          "details": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How to do it, when the task says.",
            "title": "Details"
          },
          "due_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The task's due day, in days after each month ends, or null.",
            "title": "Due Days"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it falls due for this month, or null for no due day.",
            "title": "Due On"
          },
          "is_overdue": {
            "description": "Not signed off, and its due day has passed.",
            "title": "Is Overdue",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the person who signed it off wrote beside it: the evidence.",
            "title": "Note"
          },
          "signed_off": {
            "description": "Whether it is signed off for this month.",
            "title": "Signed Off",
            "type": "boolean"
          },
          "signed_off_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was signed off.",
            "title": "Signed Off At"
          },
          "signed_off_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who signed it off.",
            "title": "Signed Off By"
          },
          "signed_off_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The address of whoever signed it off, while they are a member of these books.",
            "title": "Signed Off By Email"
          },
          "task_id": {
            "anyOf": [
              {
                "description": "An id that starts with `task_`.",
                "examples": [
                  "task_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "task"
              },
              {
                "type": "null"
              }
            ],
            "description": "The checklist task. Null in a closed month for a task deleted since.",
            "title": "Task Id"
          },
          "title": {
            "description": "The task's title; on a closed month, as it stood when the month closed.",
            "title": "Title",
            "type": "string"
          },
          "waits_on_ids": {
            "description": "Of those, the ones not yet signed off this month: until they are, it cannot be.",
            "items": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "task"
            },
            "title": "Waits On Ids",
            "type": "array"
          }
        },
        "required": [
          "task_id",
          "close_task_id",
          "title",
          "details",
          "assignee_id",
          "assignee_email",
          "due_days",
          "due_on",
          "is_overdue",
          "blocking",
          "depends_on_ids",
          "waits_on_ids",
          "signed_off",
          "signed_off_at",
          "signed_off_by",
          "signed_off_by_email",
          "note"
        ],
        "title": "ChecklistItemOut",
        "type": "object"
      },
      "CheckoutIn": {
        "properties": {
          "billing_period": {
            "default": "monthly",
            "description": "`monthly`, or `yearly` for ten months' price paid once a year.",
            "pattern": "^(monthly|yearly)$",
            "title": "Billing Period",
            "type": "string"
          },
          "plan": {
            "anyOf": [
              {
                "pattern": "^(founder|growth|scale)$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The plan to buy. Leave it out for the one the spend calls for (`required_plan`); a smaller one is refused with `plan_below_spend`.",
            "title": "Plan"
          }
        },
        "title": "CheckoutIn",
        "type": "object"
      },
      "ClosePreviewEntryOut": {
        "description": "An entry the close would post. It has no id or number: it is not in\nthe books until the month is closed.",
        "properties": {
          "amount": {
            "description": "The total of one side; both are equal.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "lines": {
            "description": "Its lines, debits first.",
            "items": {
              "$ref": "#/components/schemas/ClosePreviewLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "origins": {
            "description": "The schedule it is a share of, when it is one; otherwise empty.",
            "items": {
              "$ref": "#/components/schemas/EntryOriginOut"
            },
            "title": "Origins",
            "type": "array"
          },
          "source": {
            "description": "What would post it: `schedule` (a recognition schedule's share, an accrual or its release, depreciation), `financing` (interest on notes and venture debt, stock-based compensation) or `closing` (the year-end entry).",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "entry_date",
          "description",
          "source",
          "origins",
          "amount",
          "lines"
        ],
        "title": "ClosePreviewEntryOut",
        "type": "object"
      },
      "ClosePreviewLineOut": {
        "description": "One line of an entry the close would post.",
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "dimensions": {
            "description": "The line's value for each dimension it names, by key.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "account_code",
          "account_name",
          "direction",
          "amount",
          "dimensions"
        ],
        "title": "ClosePreviewLineOut",
        "type": "object"
      },
      "ClosePreviewOut": {
        "properties": {
          "currency": {
            "description": "The books' currency, which every amount is in.",
            "title": "Currency",
            "type": "string"
          },
          "entries": {
            "description": "What closing the month would post, in the order it would post it. Empty when it would post nothing, and for a month already closed.",
            "items": {
              "$ref": "#/components/schemas/ClosePreviewEntryOut"
            },
            "title": "Entries",
            "type": "array"
          },
          "missing_accruals": {
            "description": "The vendors the books' daily check found missing from the month, still unanswered: each bills monthly, quarterly or yearly, was due in this month and has not billed, so its cost may need accruing before the month is closed. The largest usual bill first.",
            "items": {
              "$ref": "#/components/schemas/MissingAccrualOut"
            },
            "title": "Missing Accruals",
            "type": "array"
          },
          "period": {
            "description": "The month, as `YYYY-MM`.",
            "title": "Period",
            "type": "string"
          },
          "swings": {
            "description": "The income-statement accounts whose month, as closing leaves it, is more than 50% and more than 2000 (in the books' currency) away from the average of the 3 months before: the largest change first, each with what moved it. Closing entries are left out.",
            "items": {
              "$ref": "#/components/schemas/AccountSwingOut"
            },
            "title": "Swings",
            "type": "array"
          }
        },
        "required": [
          "period",
          "currency",
          "entries",
          "swings",
          "missing_accruals"
        ],
        "title": "ClosePreviewOut",
        "type": "object"
      },
      "CloseRequest": {
        "properties": {
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          }
        },
        "title": "CloseRequest",
        "type": "object"
      },
      "CloseRunOut": {
        "description": "A close run with its tasks.",
        "properties": {
          "created_at": {
            "description": "When the run started.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "forced": {
            "description": "Closed with the explicit override, with blocking tasks still open.",
            "title": "Forced",
            "type": "boolean"
          },
          "id": {
            "description": "The run's id.",
            "examples": [
              "close_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "close_run"
          },
          "period": {
            "description": "The month it closes, like 2026-09.",
            "title": "Period",
            "type": "string"
          },
          "reopened_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the month was reopened after it.",
            "title": "Reopened At"
          },
          "signed_off_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was closed.",
            "title": "Signed Off At"
          },
          "signed_off_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who closed the month with it.",
            "title": "Signed Off By"
          },
          "status": {
            "description": "`open` while the month's close is worked, `closed` once the month is locked with it, `reopened` once the month was reopened after it.",
            "enum": [
              "open",
              "closed",
              "reopened"
            ],
            "title": "Status",
            "type": "string"
          },
          "tasks": {
            "description": "Its tasks, in the checklist's order.",
            "items": {
              "$ref": "#/components/schemas/ChecklistItemOut"
            },
            "title": "Tasks",
            "type": "array"
          },
          "tasks_done": {
            "description": "How many of its tasks are signed off.",
            "title": "Tasks Done",
            "type": "integer"
          },
          "tasks_total": {
            "description": "How many tasks it asks for.",
            "title": "Tasks Total",
            "type": "integer"
          },
          "through_sequence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Once closed, the posting sequence its figures reflect: every entry up to it is in the close. Null while open.",
            "title": "Through Sequence"
          },
          "version": {
            "description": "Which close of the month this is: 1 the first time, 2 after one reopening, and so on.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "period",
          "version",
          "status",
          "through_sequence",
          "forced",
          "signed_off_by",
          "signed_off_at",
          "reopened_at",
          "tasks_done",
          "tasks_total",
          "created_at",
          "tasks"
        ],
        "title": "CloseRunOut",
        "type": "object"
      },
      "CloseRunPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CloseRunSummaryOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CloseRunPage",
        "type": "object"
      },
      "CloseRunSummaryOut": {
        "description": "One close of one month.",
        "properties": {
          "created_at": {
            "description": "When the run started.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "forced": {
            "description": "Closed with the explicit override, with blocking tasks still open.",
            "title": "Forced",
            "type": "boolean"
          },
          "id": {
            "description": "The run's id.",
            "examples": [
              "close_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "close_run"
          },
          "period": {
            "description": "The month it closes, like 2026-09.",
            "title": "Period",
            "type": "string"
          },
          "reopened_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the month was reopened after it.",
            "title": "Reopened At"
          },
          "signed_off_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was closed.",
            "title": "Signed Off At"
          },
          "signed_off_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who closed the month with it.",
            "title": "Signed Off By"
          },
          "status": {
            "description": "`open` while the month's close is worked, `closed` once the month is locked with it, `reopened` once the month was reopened after it.",
            "enum": [
              "open",
              "closed",
              "reopened"
            ],
            "title": "Status",
            "type": "string"
          },
          "tasks_done": {
            "description": "How many of its tasks are signed off.",
            "title": "Tasks Done",
            "type": "integer"
          },
          "tasks_total": {
            "description": "How many tasks it asks for.",
            "title": "Tasks Total",
            "type": "integer"
          },
          "through_sequence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Once closed, the posting sequence its figures reflect: every entry up to it is in the close. Null while open.",
            "title": "Through Sequence"
          },
          "version": {
            "description": "Which close of the month this is: 1 the first time, 2 after one reopening, and so on.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "period",
          "version",
          "status",
          "through_sequence",
          "forced",
          "signed_off_by",
          "signed_off_at",
          "reopened_at",
          "tasks_done",
          "tasks_total",
          "created_at"
        ],
        "title": "CloseRunSummaryOut",
        "type": "object"
      },
      "CloseStatusOut": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/AccountReconciliationOut"
            },
            "title": "Accounts",
            "type": "array"
          },
          "blockers": {
            "items": {
              "$ref": "#/components/schemas/BlockerOut"
            },
            "title": "Blockers",
            "type": "array"
          },
          "can_close": {
            "title": "Can Close",
            "type": "boolean"
          },
          "checklist": {
            "items": {
              "$ref": "#/components/schemas/ChecklistItemOut"
            },
            "title": "Checklist",
            "type": "array"
          },
          "close_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CloseRunSummaryOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The month's newest close run: the one being worked, or the close that stands. Null while the month's close has not started."
          },
          "closes_fiscal_year": {
            "description": "Whether the month ends a fiscal year, so closing it also carries the year's result into retained earnings.",
            "title": "Closes Fiscal Year",
            "type": "boolean"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "open_exceptions": {
            "items": {
              "$ref": "#/components/schemas/ExceptionItemOut"
            },
            "title": "Open Exceptions",
            "type": "array"
          },
          "period": {
            "$ref": "#/components/schemas/PeriodOut"
          },
          "trial_balance_balanced": {
            "title": "Trial Balance Balanced",
            "type": "boolean"
          },
          "trial_balance_difference": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Trial Balance Difference",
            "type": "string"
          },
          "unreviewed_transactions": {
            "title": "Unreviewed Transactions",
            "type": "integer"
          }
        },
        "required": [
          "period",
          "currency",
          "can_close",
          "blockers",
          "trial_balance_balanced",
          "trial_balance_difference",
          "unreviewed_transactions",
          "accounts",
          "open_exceptions",
          "checklist",
          "close_run",
          "closes_fiscal_year"
        ],
        "title": "CloseStatusOut",
        "type": "object"
      },
      "CloseTaskChanges": {
        "description": "Only the fields sent change. `details`, `assignee_id` and `due_days`\nare cleared by sending null; `title` and `blocking` cannot be.",
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "A member of these books who does it; null for nobody.",
            "title": "Assignee Id"
          },
          "blocking": {
            "description": "Whether a month's close waits on it.",
            "title": "Blocking",
            "type": "boolean"
          },
          "depends_on_ids": {
            "anyOf": [
              {
                "items": {
                  "description": "An id that starts with `task_`.",
                  "examples": [
                    "task_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "task"
                },
                "maxItems": 50,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tasks it waits on, all of them: an empty list waits on none.",
            "title": "Depends On Ids"
          },
          "details": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How to do it; null clears it.",
            "title": "Details"
          },
          "due_days": {
            "anyOf": [
              {
                "maximum": 60.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Due this many days after each month ends; null for no due day.",
            "title": "Due Days"
          },
          "title": {
            "description": "What has to be done, in a line.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "title": "CloseTaskChanges",
        "type": "object"
      },
      "CloseTaskOut": {
        "properties": {
          "assignee_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The owner's address in these books, when there is an owner.",
            "title": "Assignee Email"
          },
          "assignee_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who does it, or null when nobody is named.",
            "title": "Assignee Id"
          },
          "blocking": {
            "description": "Whether a month's close waits on it. A task that does not block can be left undone when the month closes.",
            "title": "Blocking",
            "type": "boolean"
          },
          "created_at": {
            "description": "When the task was written.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "depends_on_ids": {
            "description": "The tasks it waits on: it is not signed off for a month until they are (decision 0089).",
            "items": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "task"
            },
            "title": "Depends On Ids",
            "type": "array"
          },
          "details": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How to do it, or where to look, when there is more to say.",
            "title": "Details"
          },
          "due_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Due this many days after each month ends (0 is the last day). Null for no due day.",
            "title": "Due Days"
          },
          "id": {
            "description": "The task's id.",
            "examples": [
              "task_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "task"
          },
          "title": {
            "description": "What has to be done, in a line: \u201cBook the payroll accrual\u201d.",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "details",
          "assignee_id",
          "assignee_email",
          "due_days",
          "blocking",
          "depends_on_ids",
          "created_at"
        ],
        "title": "CloseTaskOut",
        "type": "object"
      },
      "CloseTaskPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CloseTaskOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CloseTaskPage",
        "type": "object"
      },
      "CommentChange": {
        "properties": {
          "body": {
            "anyOf": [
              {
                "maxLength": 5000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New words; the author only.",
            "title": "Body"
          },
          "resolved": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Mark the matter settled, or open it again.",
            "title": "Resolved"
          }
        },
        "title": "CommentChange",
        "type": "object"
      },
      "CommentOut": {
        "properties": {
          "about": {
            "description": "What it is on: `transaction` or `journal_entry`.",
            "title": "About",
            "type": "string"
          },
          "author_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Email"
          },
          "author_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who wrote it; null once they have left the books' organization.",
            "title": "Author Id"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "edited_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Edited At"
          },
          "id": {
            "description": "An id that starts with `cmt_`.",
            "examples": [
              "cmt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "cmt"
          },
          "mentions": {
            "description": "The members it names; each was told.",
            "items": {
              "description": "An id that starts with `usr_`.",
              "examples": [
                "usr_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "usr"
            },
            "title": "Mentions",
            "type": "array"
          },
          "proposed_account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That account's code.",
            "title": "Proposed Account Code"
          },
          "proposed_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GL account it proposes its transaction be filed under; null on an ordinary comment. Nothing is filed until someone who may post files it.",
            "title": "Proposed Account Id"
          },
          "proposed_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That account's name.",
            "title": "Proposed Account Name"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When someone marked the matter settled.",
            "title": "Resolved At"
          },
          "subject_id": {
            "description": "The record's id: a transaction's or a journal entry's.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          }
        },
        "required": [
          "id",
          "about",
          "subject_id",
          "author_id",
          "author_email",
          "body",
          "mentions",
          "edited_at",
          "resolved_at",
          "created_at"
        ],
        "title": "CommentOut",
        "type": "object"
      },
      "CommentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CommentOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CommentPage",
        "type": "object"
      },
      "CompanyOut": {
        "description": "What the company behind these books told us about itself.",
        "properties": {
          "address_line1": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first line of the address the company files taxes from.",
            "title": "Address Line1"
          },
          "address_line2": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The second line of the address, if it has one.",
            "title": "Address Line2"
          },
          "books_start_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first day the books hold. A connection's first sync brings in nothing dated before it.",
            "title": "Books Start On"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The city of the address.",
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The country of the address: ISO 3166-1 alpha-2, \u201cUS\u201d.",
            "title": "Country"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The address the company is reached at.",
            "title": "Email"
          },
          "fiscal_year_end_month": {
            "description": "The month the fiscal year ends in, 1\u201312. 12 is a calendar year.",
            "title": "Fiscal Year End Month",
            "type": "integer"
          },
          "goals": {
            "description": "What the company came to LedgerIt to do.",
            "items": {
              "enum": [
                "bank_feeds",
                "categorize",
                "close",
                "revenue",
                "payroll",
                "receipts",
                "reports",
                "accountant",
                "api"
              ],
              "type": "string"
            },
            "title": "Goals",
            "type": "array"
          },
          "headcount": {
            "anyOf": [
              {
                "enum": [
                  "1_10",
                  "11_50",
                  "51_200",
                  "201_plus"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many people work there, as a band.",
            "title": "Headcount"
          },
          "incorporated_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day the company was incorporated.",
            "title": "Incorporated On"
          },
          "incorporation_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the company was incorporated: a US state's code (\u201cDE\u201d), or the jurisdiction as written.",
            "title": "Incorporation State"
          },
          "industry": {
            "anyOf": [
              {
                "enum": [
                  "software",
                  "fintech",
                  "ai",
                  "marketplace",
                  "consumer",
                  "hardware",
                  "health",
                  "climate",
                  "services",
                  "other"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company does.",
            "title": "Industry"
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name the company is registered under.",
            "title": "Legal Name"
          },
          "legal_structure": {
            "anyOf": [
              {
                "enum": [
                  "c_corp",
                  "s_corp",
                  "llc",
                  "partnership",
                  "sole_proprietorship",
                  "non_us"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company's tax return is filed as.",
            "title": "Legal Structure"
          },
          "name": {
            "description": "The name these books go by in the app: on the switcher, in settings, at the top of every page. Not the legal name, which is on invoices and filings.",
            "title": "Name",
            "type": "string"
          },
          "no_tax_id": {
            "description": "True when the company said it has no EIN yet.",
            "title": "No Tax Id",
            "type": "boolean"
          },
          "onboarding_completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the set-up was finished. Null while it is still in progress.",
            "title": "Onboarding Completed At"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The company's phone number.",
            "title": "Phone"
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The ZIP or postal code of the address.",
            "title": "Postal Code"
          },
          "receipts": {
            "anyOf": [
              {
                "enum": [
                  "paper",
                  "digital",
                  "both",
                  "none"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the company keeps receipts today.",
            "title": "Receipts"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The state, province or county of the address.",
            "title": "Region"
          },
          "stage": {
            "anyOf": [
              {
                "enum": [
                  "pre_seed",
                  "seed",
                  "series_a",
                  "series_b",
                  "growth",
                  "bootstrapped"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How far the company has raised.",
            "title": "Stage"
          },
          "starting_point": {
            "anyOf": [
              {
                "enum": [
                  "new",
                  "from_date",
                  "migrating"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the books begin: `new` (with the company), `from_date` (on a date chosen), or `migrating` (from QuickBooks or Xero).",
            "title": "Starting Point"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The EIN, or the local equivalent outside the US. Masked (`\u2022\u2022-\u2022\u2022\u20226789`) for a caller without the sensitive-data permission (`sensitive.read`).",
            "title": "Tax Id"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The company's IANA time zone, such as `America/New_York`: the weekly digest goes out on Monday in it. Null reads as UTC.",
            "title": "Timezone"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The company's website, as it was given.",
            "title": "Website"
          }
        },
        "required": [
          "name",
          "legal_name",
          "website",
          "phone",
          "email",
          "address_line1",
          "address_line2",
          "city",
          "region",
          "postal_code",
          "country",
          "industry",
          "stage",
          "headcount",
          "legal_structure",
          "tax_id",
          "no_tax_id",
          "fiscal_year_end_month",
          "incorporation_state",
          "incorporated_on",
          "starting_point",
          "books_start_on",
          "receipts",
          "goals",
          "timezone",
          "onboarding_completed_at"
        ],
        "title": "CompanyOut",
        "type": "object"
      },
      "CompanyPatch": {
        "description": "The fields to change. A field left out is kept; `null` clears it.",
        "properties": {
          "address_line1": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Line1"
          },
          "address_line2": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Line2"
          },
          "books_start_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not after today.",
            "title": "Books Start On"
          },
          "city": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z]{2}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "pattern": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "fiscal_year_end_month": {
            "anyOf": [
              {
                "maximum": 12.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Year End Month"
          },
          "goals": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "bank_feeds",
                    "categorize",
                    "close",
                    "revenue",
                    "payroll",
                    "receipts",
                    "reports",
                    "accountant",
                    "api"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Replaces the list; each goal once.",
            "title": "Goals"
          },
          "headcount": {
            "anyOf": [
              {
                "enum": [
                  "1_10",
                  "11_50",
                  "51_200",
                  "201_plus"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headcount"
          },
          "incorporated_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not after today.",
            "title": "Incorporated On"
          },
          "incorporation_state": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Incorporation State"
          },
          "industry": {
            "anyOf": [
              {
                "enum": [
                  "software",
                  "fintech",
                  "ai",
                  "marketplace",
                  "consumer",
                  "hardware",
                  "health",
                  "climate",
                  "services",
                  "other"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "legal_name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Name"
          },
          "legal_structure": {
            "anyOf": [
              {
                "enum": [
                  "c_corp",
                  "s_corp",
                  "llc",
                  "partnership",
                  "sole_proprietorship",
                  "non_us"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Structure"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rename the books. It cannot be cleared: `null` is refused. The organization named after them is renamed with them.",
            "title": "Name"
          },
          "no_tax_id": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "True says there is no EIN yet, and clears `tax_id`.",
            "title": "No Tax Id"
          },
          "onboarding_completed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "True finishes the set-up (the first time only); false puts it back in progress.",
            "title": "Onboarding Completed"
          },
          "phone": {
            "anyOf": [
              {
                "maxLength": 40,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "postal_code": {
            "anyOf": [
              {
                "maxLength": 20,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Postal Code"
          },
          "receipts": {
            "anyOf": [
              {
                "enum": [
                  "paper",
                  "digital",
                  "both",
                  "none"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipts"
          },
          "region": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "stage": {
            "anyOf": [
              {
                "enum": [
                  "pre_seed",
                  "seed",
                  "series_a",
                  "series_b",
                  "growth",
                  "bootstrapped"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          },
          "starting_point": {
            "anyOf": [
              {
                "enum": [
                  "new",
                  "from_date",
                  "migrating"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`new` with `incorporated_on` known and no `books_start_on` sent starts the books on it.",
            "title": "Starting Point"
          },
          "tax_id": {
            "anyOf": [
              {
                "maxLength": 30,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Setting one clears `no_tax_id`.",
            "title": "Tax Id"
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An IANA time zone, such as `America/New_York`; `null` goes back to UTC.",
            "title": "Timezone"
          },
          "website": {
            "anyOf": [
              {
                "maxLength": 300,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "title": "CompanyPatch",
        "type": "object"
      },
      "ComparisonAccountRef": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "name"
        ],
        "title": "ComparisonAccountRef",
        "type": "object"
      },
      "ComparisonDepartmentRef": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `dimv_`.",
            "examples": [
              "dimv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "dimv"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "name"
        ],
        "title": "ComparisonDepartmentRef",
        "type": "object"
      },
      "ComparisonRowOut": {
        "properties": {
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ComparisonAccountRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account, or null for a department's row."
          },
          "actual": {
            "description": "Actual, one per month; zero after `actual_through`.",
            "items": {
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
              "type": "string"
            },
            "title": "Actual",
            "type": "array"
          },
          "actual_total": {
            "description": "Actual through `actual_through`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Actual Total",
            "type": "string"
          },
          "budget": {
            "description": "Budgeted, one per month.",
            "items": {
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
              "type": "string"
            },
            "title": "Budget",
            "type": "array"
          },
          "budget_total": {
            "description": "Budgeted through `actual_through`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Budget Total",
            "type": "string"
          },
          "department": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ComparisonDepartmentRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department part, if the row has one."
          },
          "favorable": {
            "description": "Income at or above budget, or expense at or below it.",
            "title": "Favorable",
            "type": "boolean"
          },
          "kind": {
            "description": "Income is favourable above budget, expense below it.",
            "enum": [
              "income",
              "expense"
            ],
            "title": "Kind",
            "type": "string"
          },
          "section": {
            "description": "The income statement section: `revenue`, `operating_expenses`, \u2026",
            "title": "Section",
            "type": "string"
          },
          "variance": {
            "description": "Actual less budget through `actual_through`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Variance",
            "type": "string"
          },
          "variance_percent": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Variance over budget, as a fraction; null with no budget.",
            "title": "Variance Percent"
          }
        },
        "required": [
          "section",
          "kind",
          "account",
          "department",
          "budget",
          "actual",
          "budget_total",
          "actual_total",
          "variance",
          "variance_percent",
          "favorable"
        ],
        "title": "ComparisonRowOut",
        "type": "object"
      },
      "ConnectionHealthOut": {
        "description": "How the connection is doing, in plain terms (PLAN.md \u00a78.3).",
        "properties": {
          "backfill_from": {
            "description": "How far back its history is asked for: 12 months.",
            "format": "date",
            "title": "Backfill From",
            "type": "string"
          },
          "backfill_progress": {
            "description": "0 to 1: how much of that history is in.",
            "title": "Backfill Progress",
            "type": "number"
          },
          "behind_by_hours": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "How far past its target it is; null within it.",
            "title": "Behind By Hours"
          },
          "freshness_target_hours": {
            "description": "How recent its last good sync should be: 24, or 1 for Stripe.",
            "title": "Freshness Target Hours",
            "type": "integer"
          },
          "history_from": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The oldest transaction it has brought in.",
            "title": "History From"
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last sync that succeeded.",
            "title": "Last Success At"
          },
          "reauth_by": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the provider needs a person to sign in again, if it says.",
            "title": "Reauth By"
          },
          "state": {
            "description": "`healthy`, `behind` (no successful sync within its target), `failing`, `reauth_soon` (a person must sign in again within a week), `paused` or `revoked`.",
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state",
          "freshness_target_hours",
          "last_success_at",
          "behind_by_hours",
          "reauth_by",
          "history_from",
          "backfill_from",
          "backfill_progress"
        ],
        "title": "ConnectionHealthOut",
        "type": "object"
      },
      "ConnectionOut": {
        "description": "A connection's state. Never its credentials.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GL account it feeds, when it feeds one.",
            "title": "Account Id"
          },
          "configured": {
            "description": "Whether credentials are on file. Never the credentials themselves.",
            "title": "Configured",
            "type": "boolean"
          },
          "health": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionHealthOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "How it is doing; given when connections are listed or read one by one."
          },
          "id": {
            "description": "An id that starts with `conn_`.",
            "examples": [
              "conn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "conn"
          },
          "kind": {
            "description": "`banking`, `card`, `revenue`, `payroll`, `ledger`, \u2026",
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What tells two connections to one provider apart.",
            "title": "Label"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What went wrong last, in the provider's words; null when nothing did.",
            "title": "Last Error"
          },
          "last_synced_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it last synced, successfully or not.",
            "title": "Last Synced At"
          },
          "people_unreadable_since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Since when the provider has refused to let the books read its people (Brex `users.readonly`, Ramp `users:read`), so cardholders are known by name only. Null when it may. Connecting the provider again with that scope grants it, and the next sync clears this.",
            "title": "People Unreadable Since"
          },
          "provider": {
            "description": "What it connects: `brex`, `ramp`, `mercury`, `stripe`, \u2026",
            "title": "Provider",
            "type": "string"
          },
          "status": {
            "description": "`active`, `error`, `paused` or `revoked`.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "kind",
          "label",
          "status",
          "configured",
          "account_id",
          "last_synced_at",
          "last_error"
        ],
        "title": "ConnectionOut",
        "type": "object"
      },
      "ConnectionPage": {
        "description": "A page of the books' connections.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ConnectionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ConnectionPage",
        "type": "object"
      },
      "ConsolidatedEntityOut": {
        "properties": {
          "average_rate": {
            "description": "The mean rate over the period: what its income and expense are translated at.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Average Rate",
            "type": "string"
          },
          "closing_rate": {
            "description": "One unit of its currency in the presenting currency on `as_of`: what its balance sheet is translated at. 1 for books in the presenting currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Closing Rate",
            "type": "string"
          },
          "currency": {
            "description": "The currency the set of books keeps.",
            "title": "Currency",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `ent_`.",
            "examples": [
              "ent_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "ent"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "currency",
          "closing_rate",
          "average_rate"
        ],
        "title": "ConsolidatedEntityOut",
        "type": "object"
      },
      "ConsolidatedLineOut": {
        "properties": {
          "amounts": {
            "description": "Translated, one per set of books in `entities` order, on the line's natural side.",
            "items": {
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
              "type": "string"
            },
            "title": "Amounts",
            "type": "array"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account code the line adds up across the books; null for an added line.",
            "title": "Code"
          },
          "eliminations": {
            "description": "What eliminating intercompany balances took off the line.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Eliminations",
            "type": "string"
          },
          "key": {
            "anyOf": [
              {
                "enum": [
                  "earlier_earnings",
                  "net_income",
                  "translation_adjustment",
                  "intercompany_difference"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a line consolidation adds rather than an account: `earlier_earnings`, `net_income`, `translation_adjustment` or `intercompany_difference`.",
            "title": "Key"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "total": {
            "description": "The amounts plus the eliminations: the consolidated figure.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "type": {
            "description": "`asset`, `liability`, `equity`, `income` or `expense`.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "code",
          "key",
          "name",
          "amounts",
          "eliminations",
          "total"
        ],
        "title": "ConsolidatedLineOut",
        "type": "object"
      },
      "ConsolidationOut": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "balance_sheet": {
            "description": "Assets, liabilities, then equity, on `as_of`.",
            "items": {
              "$ref": "#/components/schemas/ConsolidatedLineOut"
            },
            "title": "Balance Sheet",
            "type": "array"
          },
          "balanced": {
            "description": "Whether assets equal liabilities and equity. False is a defect to show.",
            "title": "Balanced",
            "type": "boolean"
          },
          "currency": {
            "description": "The presenting currency: these books' own.",
            "title": "Currency",
            "type": "string"
          },
          "eliminations": {
            "items": {
              "$ref": "#/components/schemas/EliminationOut"
            },
            "title": "Eliminations",
            "type": "array"
          },
          "entities": {
            "description": "Every set of books of the organization, these first.",
            "items": {
              "$ref": "#/components/schemas/ConsolidatedEntityOut"
            },
            "title": "Entities",
            "type": "array"
          },
          "income_statement": {
            "description": "Income, then expense, from `start` to `as_of`.",
            "items": {
              "$ref": "#/components/schemas/ConsolidatedLineOut"
            },
            "title": "Income Statement",
            "type": "array"
          },
          "net_income": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Income",
            "type": "string"
          },
          "start": {
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "total_assets": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Assets",
            "type": "string"
          },
          "total_equity": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Equity",
            "type": "string"
          },
          "total_liabilities": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Liabilities",
            "type": "string"
          }
        },
        "required": [
          "start",
          "as_of",
          "currency",
          "entities",
          "balance_sheet",
          "income_statement",
          "eliminations",
          "total_assets",
          "total_liabilities",
          "total_equity",
          "net_income",
          "balanced"
        ],
        "title": "ConsolidationOut",
        "type": "object"
      },
      "ContributionCalendar": {
        "properties": {
          "days": {
            "description": "Every day of the range, oldest first, zeros included.",
            "items": {
              "$ref": "#/components/schemas/CalendarDay"
            },
            "title": "Days",
            "type": "array"
          },
          "first_day": {
            "format": "date",
            "title": "First Day",
            "type": "string"
          },
          "last_day": {
            "format": "date",
            "title": "Last Day",
            "type": "string"
          },
          "total": {
            "description": "Contributions over the whole range.",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "first_day",
          "last_day",
          "total",
          "days"
        ],
        "title": "ContributionCalendar",
        "type": "object"
      },
      "ContributionDetail": {
        "properties": {
          "action": {
            "description": "The audit action it was drawn from: `event.categorized`.",
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "$ref": "#/components/schemas/ContributorOut"
          },
          "amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction's or entry's amount, unsigned like theirs, a decimal string.",
            "title": "Amount"
          },
          "audit_id": {
            "description": "The audit trail row it was drawn from.",
            "examples": [
              "audit_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Audit Id",
            "type": "string",
            "x-id-prefix": "audit"
          },
          "category": {
            "description": "The family it counts under on a profile: `transactions`, `reconciliation`, `journal`, `close`, `review`, `rules` or `records`.",
            "enum": [
              "transactions",
              "reconciliation",
              "journal",
              "close",
              "review",
              "rules",
              "records"
            ],
            "title": "Category",
            "type": "string"
          },
          "changes": {
            "description": "What the work changed, before and after.",
            "items": {
              "$ref": "#/components/schemas/ChangeOut"
            },
            "title": "Changes",
            "type": "array"
          },
          "contribution_type": {
            "description": "The kind of work: `transaction.categorized`, `account.reconciled`, `journal_entry.posted`, `ai_work.approved`, \u2026",
            "enum": [
              "transaction.categorized",
              "transaction.classified",
              "transaction.excluded",
              "transaction.matched",
              "transaction.reconciled",
              "account.reconciled",
              "journal_entry.posted",
              "journal_entry.updated",
              "journal_entry.reversed",
              "rule.created",
              "rule.updated",
              "exception.resolved",
              "close_task.completed",
              "period.closed",
              "period.locked",
              "period.reopened",
              "review.completed",
              "ai_work.approved",
              "ai_work.corrected",
              "counterparty.created",
              "counterparty.updated",
              "data.imported",
              "evidence.attached"
            ],
            "title": "Contribution Type",
            "type": "string"
          },
          "counted": {
            "description": "Whether it adds to the count. The same work on the same record by the same person the same day counts once, and an undo takes that day's back.",
            "title": "Counted",
            "type": "boolean"
          },
          "created_at": {
            "description": "When the work was done.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That amount's currency.",
            "title": "Currency"
          },
          "day": {
            "description": "The UTC day it counts on.",
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the audit row recorded about the work; its shape varies.",
            "title": "Detail"
          },
          "group_key": {
            "description": "What it was done with: the request, or else the hour of the same work by the same actor. The feed shows one group as one row.",
            "title": "Group Key",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `contrib_`.",
            "examples": [
              "contrib_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "contrib"
          },
          "lines": {
            "description": "The journal lines it wrote or took back, as a diff.",
            "items": {
              "$ref": "#/components/schemas/EntryLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "related": {
            "description": "The records around it: transaction, entry, account, period.",
            "items": {
              "$ref": "#/components/schemas/RelatedOut"
            },
            "title": "Related",
            "type": "array"
          },
          "subject_id": {
            "description": "That record's id, prefixed for its kind.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The record as a person names it; null for one that is gone.",
            "title": "Subject Label"
          },
          "subject_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the record is opened by, where that is not its id: an entry's number, a period's `YYYY-MM`, the account a reconciliation checked, the statement a match was on.",
            "title": "Subject Ref"
          },
          "subject_type": {
            "description": "The kind of record the work was on.",
            "title": "Subject Type",
            "type": "string"
          },
          "via_assistant": {
            "default": false,
            "description": "The assistant proposed it and the member named as the actor approved it.",
            "title": "Via Assistant",
            "type": "boolean"
          },
          "weight": {
            "description": "What it adds to its day: 1, 0 (a repeat) or -1 (an undo).",
            "title": "Weight",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "created_at",
          "day",
          "actor",
          "contribution_type",
          "category",
          "action",
          "subject_type",
          "subject_id",
          "counted",
          "weight",
          "group_key",
          "audit_id",
          "changes",
          "lines",
          "related"
        ],
        "title": "ContributionDetail",
        "type": "object"
      },
      "ContributionFeed": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ContributionGroupOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ContributionFeed",
        "type": "object"
      },
      "ContributionGroupOut": {
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/ContributorOut"
          },
          "category": {
            "enum": [
              "transactions",
              "reconciliation",
              "journal",
              "close",
              "review",
              "rules",
              "records"
            ],
            "title": "Category",
            "type": "string"
          },
          "contribution_type": {
            "enum": [
              "transaction.categorized",
              "transaction.classified",
              "transaction.excluded",
              "transaction.matched",
              "transaction.reconciled",
              "account.reconciled",
              "journal_entry.posted",
              "journal_entry.updated",
              "journal_entry.reversed",
              "rule.created",
              "rule.updated",
              "exception.resolved",
              "close_task.completed",
              "period.closed",
              "period.locked",
              "period.reopened",
              "review.completed",
              "ai_work.approved",
              "ai_work.corrected",
              "counterparty.created",
              "counterparty.updated",
              "data.imported",
              "evidence.attached"
            ],
            "title": "Contribution Type",
            "type": "string"
          },
          "count": {
            "description": "How many contributions the group holds on this page.",
            "title": "Count",
            "type": "integer"
          },
          "counted": {
            "description": "How many of them add to the count.",
            "title": "Counted",
            "type": "integer"
          },
          "first_at": {
            "description": "The earliest of them.",
            "format": "date-time",
            "title": "First At",
            "type": "string"
          },
          "items": {
            "description": "The newest 5 of them.",
            "items": {
              "$ref": "#/components/schemas/ContributionOut"
            },
            "title": "Items",
            "type": "array"
          },
          "key": {
            "description": "Stable for the group: the same on the next page if it continues there.",
            "title": "Key",
            "type": "string"
          },
          "last_at": {
            "description": "The latest of them.",
            "format": "date-time",
            "title": "Last At",
            "type": "string"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "For the model's categorizations: how many a person has since kept or changed."
          }
        },
        "required": [
          "key",
          "actor",
          "contribution_type",
          "category",
          "count",
          "counted",
          "first_at",
          "last_at",
          "items"
        ],
        "title": "ContributionGroupOut",
        "type": "object"
      },
      "ContributionOut": {
        "properties": {
          "action": {
            "description": "The audit action it was drawn from: `event.categorized`.",
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "$ref": "#/components/schemas/ContributorOut"
          },
          "audit_id": {
            "description": "The audit trail row it was drawn from.",
            "examples": [
              "audit_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Audit Id",
            "type": "string",
            "x-id-prefix": "audit"
          },
          "category": {
            "description": "The family it counts under on a profile: `transactions`, `reconciliation`, `journal`, `close`, `review`, `rules` or `records`.",
            "enum": [
              "transactions",
              "reconciliation",
              "journal",
              "close",
              "review",
              "rules",
              "records"
            ],
            "title": "Category",
            "type": "string"
          },
          "contribution_type": {
            "description": "The kind of work: `transaction.categorized`, `account.reconciled`, `journal_entry.posted`, `ai_work.approved`, \u2026",
            "enum": [
              "transaction.categorized",
              "transaction.classified",
              "transaction.excluded",
              "transaction.matched",
              "transaction.reconciled",
              "account.reconciled",
              "journal_entry.posted",
              "journal_entry.updated",
              "journal_entry.reversed",
              "rule.created",
              "rule.updated",
              "exception.resolved",
              "close_task.completed",
              "period.closed",
              "period.locked",
              "period.reopened",
              "review.completed",
              "ai_work.approved",
              "ai_work.corrected",
              "counterparty.created",
              "counterparty.updated",
              "data.imported",
              "evidence.attached"
            ],
            "title": "Contribution Type",
            "type": "string"
          },
          "counted": {
            "description": "Whether it adds to the count. The same work on the same record by the same person the same day counts once, and an undo takes that day's back.",
            "title": "Counted",
            "type": "boolean"
          },
          "created_at": {
            "description": "When the work was done.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "day": {
            "description": "The UTC day it counts on.",
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the audit row recorded about the work; its shape varies.",
            "title": "Detail"
          },
          "group_key": {
            "description": "What it was done with: the request, or else the hour of the same work by the same actor. The feed shows one group as one row.",
            "title": "Group Key",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `contrib_`.",
            "examples": [
              "contrib_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "contrib"
          },
          "subject_id": {
            "description": "That record's id, prefixed for its kind.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The record as a person names it; null for one that is gone.",
            "title": "Subject Label"
          },
          "subject_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the record is opened by, where that is not its id: an entry's number, a period's `YYYY-MM`, the account a reconciliation checked, the statement a match was on.",
            "title": "Subject Ref"
          },
          "subject_type": {
            "description": "The kind of record the work was on.",
            "title": "Subject Type",
            "type": "string"
          },
          "via_assistant": {
            "default": false,
            "description": "The assistant proposed it and the member named as the actor approved it.",
            "title": "Via Assistant",
            "type": "boolean"
          },
          "weight": {
            "description": "What it adds to its day: 1, 0 (a repeat) or -1 (an undo).",
            "title": "Weight",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "created_at",
          "day",
          "actor",
          "contribution_type",
          "category",
          "action",
          "subject_type",
          "subject_id",
          "counted",
          "weight",
          "group_key",
          "audit_id"
        ],
        "title": "ContributionOut",
        "type": "object"
      },
      "ContributionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ContributionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ContributionPage",
        "type": "object"
      },
      "ContributionStats": {
        "properties": {
          "by_category": {
            "description": "Each family of work, most first.",
            "items": {
              "$ref": "#/components/schemas/CategoryCount"
            },
            "title": "By Category",
            "type": "array"
          },
          "by_type": {
            "description": "Each kind of work, most first.",
            "items": {
              "$ref": "#/components/schemas/TypeCount"
            },
            "title": "By Type",
            "type": "array"
          },
          "current_streak": {
            "description": "Days in a row with work, ending today or yesterday.",
            "title": "Current Streak",
            "type": "integer"
          },
          "days_active": {
            "description": "Days with at least one contribution.",
            "title": "Days Active",
            "type": "integer"
          },
          "first_day": {
            "format": "date",
            "title": "First Day",
            "type": "string"
          },
          "last_day": {
            "format": "date",
            "title": "Last Day",
            "type": "string"
          },
          "longest_streak": {
            "description": "The longest run of days with work in the range.",
            "title": "Longest Streak",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "first_day",
          "last_day",
          "total",
          "days_active",
          "current_streak",
          "longest_streak",
          "by_type",
          "by_category"
        ],
        "title": "ContributionStats",
        "type": "object"
      },
      "ContributorOut": {
        "properties": {
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their profile picture, when they have one.",
            "title": "Avatar Url"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their email, while they are in these books; null once they leave.",
            "title": "Email"
          },
          "id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member; null for the model and the system.",
            "title": "Id"
          },
          "kind": {
            "description": "`user` (a member), `model` (the model's own work) or `system` (the books themselves: a sync, a schedule).",
            "enum": [
              "user",
              "system",
              "model"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their name, while they are in these books and gave one; null otherwise.",
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their role in these books (`owner`, `accountant`, \u2026); null once they leave.",
            "title": "Role"
          }
        },
        "required": [
          "kind"
        ],
        "title": "ContributorOut",
        "type": "object"
      },
      "ConversionOut": {
        "properties": {
          "amount": {
            "description": "What converts: a SAFE's purchase amount, or a note's principal and accrued interest.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "at_par": {
            "description": "The shares at par: what goes to preferred stock.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "At Par",
            "type": "string"
          },
          "basis": {
            "description": "Which price it is: `round`, `cap` or `discount`.",
            "title": "Basis",
            "type": "string"
          },
          "cap_price": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The valuation cap over the capitalization, for a SAFE with a cap.",
            "title": "Cap Price"
          },
          "discount_price": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The round's price less the discount, for a SAFE with one.",
            "title": "Discount Price"
          },
          "interest": {
            "description": "A note's accrued interest within `amount`; zero for a SAFE.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Interest",
            "type": "string"
          },
          "paid_in": {
            "description": "The rest of the amount: what goes to paid-in capital.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Paid In",
            "type": "string"
          },
          "price": {
            "description": "The lowest of the three: the price the SAFE converts at.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Price",
            "type": "string"
          },
          "round_price": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Round Price",
            "type": "string"
          },
          "shares": {
            "description": "The shares it converts into, rounded down to a whole share.",
            "title": "Shares",
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "interest",
          "round_price",
          "cap_price",
          "discount_price",
          "price",
          "basis",
          "shares",
          "at_par",
          "paid_in"
        ],
        "title": "ConversionOut",
        "type": "object"
      },
      "CounterpartyCategoryOut": {
        "description": "A GL account this counterparty's transactions are filed to, and how many.",
        "properties": {
          "account_id": {
            "description": "The GL account they are filed to.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "transaction_count": {
            "description": "Transactions naming them filed to it, counted as `transaction_count` is.",
            "title": "Transaction Count",
            "type": "integer"
          }
        },
        "required": [
          "account_id",
          "transaction_count"
        ],
        "title": "CounterpartyCategoryOut",
        "type": "object"
      },
      "CounterpartyChanges": {
        "description": "Only the fields sent change. Everything but `name` and the two roles is\ncleared by sending null; those three are typed without null and default\nto None only so that leaving one out means \"unchanged\".",
        "properties": {
          "country": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z]{2}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "default_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Account Id"
          },
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "is_customer": {
            "title": "Is Customer",
            "type": "boolean"
          },
          "is_vendor": {
            "title": "Is Vendor",
            "type": "boolean"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Days"
          },
          "region": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "tax_classification": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Classification"
          },
          "w9_received_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "W9 Received On"
          },
          "website": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their website. Changing it looks for their logo there again.",
            "title": "Website"
          }
        },
        "title": "CounterpartyChanges",
        "type": "object"
      },
      "CounterpartyMonthOut": {
        "description": "One calendar month of a counterparty's activity.",
        "properties": {
          "month": {
            "description": "The first day of the month.",
            "format": "date",
            "title": "Month",
            "type": "string"
          },
          "total_in": {
            "description": "Received from them that month, in the books' currency, as a positive figure.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total In",
            "type": "string"
          },
          "total_out": {
            "description": "Paid to them that month, in the books' currency, as a positive figure.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Out",
            "type": "string"
          },
          "transaction_count": {
            "description": "Transactions naming them that month.",
            "title": "Transaction Count",
            "type": "integer"
          }
        },
        "required": [
          "month",
          "transaction_count",
          "total_out",
          "total_in"
        ],
        "title": "CounterpartyMonthOut",
        "type": "object"
      },
      "CounterpartyMonthsOut": {
        "properties": {
          "data": {
            "description": "Every month from their first transaction to their last, oldest first; a month with nothing in it is there with zeros. Counts what `transaction_count`, `total_out` and `total_in` on the counterparty count.",
            "items": {
              "$ref": "#/components/schemas/CounterpartyMonthOut"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "CounterpartyMonthsOut",
        "type": "object"
      },
      "CounterpartyOut": {
        "properties": {
          "billing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingCadenceOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "How often they bill, when their bills (or, with none, their charges) keep a monthly, quarterly or yearly rhythm; null when they keep none."
          },
          "categories": {
            "description": "Every GL account their transactions are filed to, the most used first. A split transaction counts under none; one still waiting for review is not counted.",
            "items": {
              "$ref": "#/components/schemas/CounterpartyCategoryOut"
            },
            "title": "Categories",
            "type": "array"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "default_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Account Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "first_transaction_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The date of the earliest transaction naming them; null with none.",
            "title": "First Transaction On"
          },
          "found_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The logo found on their website, whether or not an upload is shown instead: what they show once an uploaded logo is removed. Null for none.",
            "title": "Found Logo Url"
          },
          "id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "is_customer": {
            "title": "Is Customer",
            "type": "boolean"
          },
          "is_vendor": {
            "title": "Is Vendor",
            "type": "boolean"
          },
          "last_transaction_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Transaction On"
          },
          "logo_source": {
            "anyOf": [
              {
                "enum": [
                  "uploaded",
                  "found"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where `logo_url` comes from: `uploaded`, a logo a person uploaded for them, which wins; `found`, the icon of their website, found by LedgerIt; null for none.",
            "title": "Logo Source"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their logo, square PNG; null for none.",
            "title": "Logo Url"
          },
          "merged_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was merged, or null.",
            "title": "Merged At"
          },
          "merged_into_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "The counterparty this one was merged into, or null. A merged one is kept for the posted lines that name it and left out of the list; everything else about them is on the one it went into.",
            "title": "Merged Into Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Days"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "roles": {
            "description": "What they are to these books: customer, vendor, employee, investor, lender or founder. `is_customer` and `is_vendor` say the first two.",
            "items": {
              "enum": [
                "customer",
                "vendor",
                "employee",
                "investor",
                "lender",
                "founder"
              ],
              "type": "string"
            },
            "title": "Roles",
            "type": "array"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "tax_classification": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Classification"
          },
          "total_in": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total In",
            "type": "string"
          },
          "total_out": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Out",
            "type": "string"
          },
          "transaction_count": {
            "title": "Transaction Count",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "w9_received_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "W9 Received On"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their website, as a full URL with its scheme.",
            "title": "Website"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "is_customer",
          "is_vendor",
          "roles",
          "email",
          "country",
          "region",
          "tax_classification",
          "w9_received_on",
          "payment_terms_days",
          "default_account_id",
          "notes",
          "website",
          "logo_url",
          "found_logo_url",
          "logo_source",
          "transaction_count",
          "total_out",
          "total_in",
          "first_transaction_on",
          "last_transaction_on",
          "categories",
          "billing",
          "merged_into_id",
          "merged_at",
          "created_at",
          "updated_at"
        ],
        "title": "CounterpartyOut",
        "type": "object"
      },
      "CounterpartyPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CounterpartyOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CounterpartyPage",
        "type": "object"
      },
      "CreditAppliedOut": {
        "properties": {
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "invoice_id": {
            "description": "An id that starts with `inv_`.",
            "examples": [
              "inv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Invoice Id",
            "type": "string",
            "x-id-prefix": "inv"
          },
          "number": {
            "title": "Number",
            "type": "string"
          }
        },
        "required": [
          "invoice_id",
          "number",
          "amount"
        ],
        "title": "CreditAppliedOut",
        "type": "object"
      },
      "CreditNoteApply": {
        "properties": {
          "invoice_ids": {
            "anyOf": [
              {
                "items": {
                  "description": "An id that starts with `inv_`.",
                  "examples": [
                    "inv_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "inv"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer's invoices to apply it to; the oldest first when left out.",
            "title": "Invoice Ids"
          }
        },
        "title": "CreditNoteApply",
        "type": "object"
      },
      "CreditNoteCreate": {
        "properties": {
          "issue_date": {
            "format": "date",
            "title": "Issue Date",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/CreditNoteLineIn"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unique in these books; the next CN-0001-style number when left out.",
            "title": "Number"
          },
          "original_invoice_id": {
            "anyOf": [
              {
                "description": "An id that starts with `inv_`.",
                "examples": [
                  "inv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "inv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer's issued invoice it corrects; it is applied to it when issued.",
            "title": "Original Invoice Id"
          },
          "party_id": {
            "description": "The customer: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          }
        },
        "required": [
          "party_id",
          "issue_date",
          "lines"
        ],
        "title": "CreditNoteCreate",
        "type": "object"
      },
      "CreditNoteLineIn": {
        "properties": {
          "account_id": {
            "description": "The income (or deferred revenue) account it comes off.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "description": {
            "description": "What is credited, as the customer reads it.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "quantity": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "1",
            "title": "Quantity"
          },
          "service_end": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service End"
          },
          "service_start": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Start"
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "description": "Must be 0 until tax is supported.",
            "title": "Tax Amount"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Unit Price"
          }
        },
        "required": [
          "description",
          "unit_price",
          "account_id"
        ],
        "title": "CreditNoteLineIn",
        "type": "object"
      },
      "CreditNoteLineOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "line_no": {
            "title": "Line No",
            "type": "integer"
          },
          "quantity": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Quantity",
            "type": "string"
          },
          "service_end": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service End"
          },
          "service_start": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Start"
          },
          "tax_amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Tax Amount",
            "type": "string"
          },
          "unit_price": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unit Price",
            "type": "string"
          }
        },
        "required": [
          "line_no",
          "description",
          "quantity",
          "unit_price",
          "amount",
          "account_id",
          "tax_amount",
          "service_start",
          "service_end"
        ],
        "title": "CreditNoteLineOut",
        "type": "object"
      },
      "CreditNoteOut": {
        "properties": {
          "applied_to": {
            "items": {
              "$ref": "#/components/schemas/CreditAppliedOut"
            },
            "title": "Applied To",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Id"
          },
          "id": {
            "description": "An id that starts with `cn_`.",
            "examples": [
              "cn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "cn"
          },
          "issue_date": {
            "format": "date",
            "title": "Issue Date",
            "type": "string"
          },
          "issued_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/CreditNoteLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "title": "Number",
            "type": "string"
          },
          "original_invoice_id": {
            "anyOf": [
              {
                "description": "An id that starts with `inv_`.",
                "examples": [
                  "inv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "inv"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Invoice Id"
          },
          "party_id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "row_version": {
            "title": "Row Version",
            "type": "integer"
          },
          "status": {
            "description": "`draft`, `issued` or `void`.",
            "title": "Status",
            "type": "string"
          },
          "subtotal": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Subtotal",
            "type": "string"
          },
          "tax_total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Tax Total",
            "type": "string"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "unapplied": {
            "description": "What is left of the credit to apply; 0 for a draft or a void credit note.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unapplied",
            "type": "string"
          },
          "void_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Void Entry Id"
          },
          "voided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voided At"
          }
        },
        "required": [
          "id",
          "number",
          "party_id",
          "original_invoice_id",
          "issue_date",
          "currency",
          "subtotal",
          "tax_total",
          "total",
          "status",
          "unapplied",
          "applied_to",
          "customer_name",
          "memo",
          "entry_id",
          "void_entry_id",
          "issued_at",
          "voided_at",
          "created_at",
          "row_version",
          "lines"
        ],
        "title": "CreditNoteOut",
        "type": "object"
      },
      "CreditNotePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CreditNoteOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CreditNotePage",
        "type": "object"
      },
      "CreditNoteUpdate": {
        "properties": {
          "issue_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issue Date"
          },
          "lines": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CreditNoteLineIn"
                },
                "maxItems": 500,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lines"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Number"
          },
          "original_invoice_id": {
            "anyOf": [
              {
                "description": "An id that starts with `inv_`.",
                "examples": [
                  "inv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "inv"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Invoice Id"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Id"
          }
        },
        "title": "CreditNoteUpdate",
        "type": "object"
      },
      "CreditNoteVoid": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "title": "CreditNoteVoid",
        "type": "object"
      },
      "DecisionOut": {
        "properties": {
          "actor_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "decision": {
            "title": "Decision",
            "type": "string"
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          }
        },
        "required": [
          "actor_id",
          "decision",
          "comment",
          "recorded_at"
        ],
        "title": "DecisionOut",
        "type": "object"
      },
      "DepartmentAmountOut": {
        "properties": {
          "amount": {
            "description": "The department's share of the run; below zero when expense was taken back.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "department": {
            "$ref": "#/components/schemas/DepartmentRef"
          }
        },
        "required": [
          "department",
          "amount"
        ],
        "title": "DepartmentAmountOut",
        "type": "object"
      },
      "DepartmentRef": {
        "properties": {
          "id": {
            "description": "An id that starts with `dimv_`.",
            "examples": [
              "dimv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "dimv"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "DepartmentRef",
        "type": "object"
      },
      "DepartmentSpendOut": {
        "properties": {
          "amount": {
            "description": "Operating expenses naming this department itself.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "code": {
            "description": "The department value's code, e.g. RD.",
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department this one sits under.",
            "title": "Parent Id"
          },
          "total": {
            "description": "This department and every department under it.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "value_id": {
            "description": "An id that starts with `dimv_`.",
            "examples": [
              "dimv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Value Id",
            "type": "string",
            "x-id-prefix": "dimv"
          }
        },
        "required": [
          "value_id",
          "code",
          "name",
          "parent_id",
          "amount",
          "total"
        ],
        "title": "DepartmentSpendOut",
        "type": "object"
      },
      "DepreciationMonthOut": {
        "properties": {
          "amount": {
            "description": "The month's depreciation.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "ends_on": {
            "description": "The month's last day.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "journal_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry that posted it; null while still to come.",
            "title": "Journal Entry Id"
          },
          "recognized_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day of the entry that posted it: a later close's, when the month was caught up.",
            "title": "Recognized On"
          }
        },
        "required": [
          "ends_on",
          "amount",
          "journal_entry_id",
          "recognized_on"
        ],
        "title": "DepreciationMonthOut",
        "type": "object"
      },
      "DestinationCreate": {
        "properties": {
          "details": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "For `ach` and `wire`: `account_number` and `routing_number`. For `check`: `name`, `line1`, `city`, `region` and `postal_code`. Kept encrypted; never returned.",
            "title": "Details",
            "type": "object"
          },
          "party_id": {
            "description": "The vendor paid there: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "rail": {
            "description": "`ach`, `wire` or `check`.",
            "title": "Rail",
            "type": "string"
          }
        },
        "required": [
          "party_id",
          "rail",
          "details"
        ],
        "title": "DestinationCreate",
        "type": "object"
      },
      "DestinationOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `dest_`.",
            "examples": [
              "dest_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "dest"
          },
          "masked": {
            "description": "What may be shown of the details: the last four digits, or the city.",
            "title": "Masked",
            "type": "string"
          },
          "party_id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "rail": {
            "title": "Rail",
            "type": "string"
          },
          "status": {
            "description": "`unverified`, `verified`, `blocked` or `superseded`.",
            "title": "Status",
            "type": "string"
          },
          "verification_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verification Note"
          },
          "verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          },
          "version": {
            "description": "Each change of details is a new version; the one before is superseded.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "party_id",
          "version",
          "rail",
          "masked",
          "status",
          "verified_at",
          "verification_note",
          "created_at"
        ],
        "title": "DestinationOut",
        "type": "object"
      },
      "DestinationPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DestinationOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DestinationPage",
        "type": "object"
      },
      "DestinationVerify": {
        "properties": {
          "note": {
            "description": "How the details were confirmed with the vendor.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Note",
            "type": "string"
          }
        },
        "required": [
          "note"
        ],
        "title": "DestinationVerify",
        "type": "object"
      },
      "DetectedSourceOut": {
        "properties": {
          "connection_id": {
            "anyOf": [
              {
                "description": "An id that starts with `conn_`.",
                "examples": [
                  "conn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "conn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The connection that satisfied the suggestion.",
            "title": "Connection Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "dismissed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dismissed At"
          },
          "dismissed_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who dismissed it; null when nobody did, or they have gone.",
            "title": "Dismissed By"
          },
          "first_seen_on": {
            "description": "The earliest line that named it.",
            "format": "date",
            "title": "First Seen On",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `detected_source_`.",
            "examples": [
              "detected_source_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "detected_source"
          },
          "inflow": {
            "$ref": "#/components/schemas/Money",
            "description": "What came in from it, in the books' currency."
          },
          "key": {
            "description": "The source, by the catalog's key for it: `stripe`, `paypal`, `adp`.",
            "title": "Key",
            "type": "string"
          },
          "kind": {
            "description": "What connecting it would bring: `revenue`, `banking`, `card`, `payroll`, `ap`, `ledger` or `cap_table`.",
            "title": "Kind",
            "type": "string"
          },
          "last_seen_on": {
            "description": "The latest line that named it.",
            "format": "date",
            "title": "Last Seen On",
            "type": "string"
          },
          "name": {
            "description": "The source's name: Stripe, PayPal, ADP.",
            "title": "Name",
            "type": "string"
          },
          "outflow": {
            "$ref": "#/components/schemas/Money",
            "description": "What went out to it, in the books' currency."
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The provider that connects it (`POST /connections`), or null when nothing does yet and a statement upload is the way in.",
            "title": "Provider"
          },
          "samples": {
            "description": "Its newest lines, at most five: the evidence.",
            "items": {
              "$ref": "#/components/schemas/DetectedSourceSampleOut"
            },
            "title": "Samples",
            "type": "array"
          },
          "sightings": {
            "description": "How many lines named it.",
            "title": "Sightings",
            "type": "integer"
          },
          "status": {
            "description": "`open`: suggested. `dismissed`: a person said the books do not use it. `connected`: a connection to its provider exists.",
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "name",
          "kind",
          "provider",
          "status",
          "first_seen_on",
          "last_seen_on",
          "sightings",
          "inflow",
          "outflow",
          "connection_id",
          "dismissed_by",
          "dismissed_at",
          "samples",
          "created_at",
          "updated_at"
        ],
        "title": "DetectedSourceOut",
        "type": "object"
      },
      "DetectedSourcePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DetectedSourceOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DetectedSourcePage",
        "type": "object"
      },
      "DetectedSourceSampleOut": {
        "description": "One of the lines that named the source.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Money",
            "description": "Signed: positive came in, negative went out."
          },
          "date": {
            "description": "The line's date, in its source's reckoning.",
            "format": "date",
            "title": "Date",
            "type": "string"
          },
          "description": {
            "description": "The line, as its source wrote it.",
            "title": "Description",
            "type": "string"
          },
          "matched_text": {
            "description": "The words in the line that named the source: `stripe`, `gusto`.",
            "title": "Matched Text",
            "type": "string"
          },
          "transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction the line became, when it did (`GET /transactions/{id}`).",
            "title": "Transaction Id"
          }
        },
        "required": [
          "transaction_id",
          "date",
          "description",
          "amount",
          "matched_text"
        ],
        "title": "DetectedSourceSampleOut",
        "type": "object"
      },
      "DetectedSourceScanOut": {
        "description": "What reading the lines again found.",
        "properties": {
          "examined": {
            "description": "Lines read.",
            "title": "Examined",
            "type": "integer"
          },
          "sightings": {
            "description": "Lines that named a source for the first time.",
            "title": "Sightings",
            "type": "integer"
          },
          "sources": {
            "description": "The keys of the sources the lines named.",
            "items": {
              "type": "string"
            },
            "title": "Sources",
            "type": "array"
          }
        },
        "required": [
          "examined",
          "sightings",
          "sources"
        ],
        "title": "DetectedSourceScanOut",
        "type": "object"
      },
      "DetectedSourceUpdate": {
        "properties": {
          "status": {
            "description": "`dismissed` to say the books do not use it (it is not suggested again), or `open` to take that back. `connected` is never set by hand: connect the provider.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "DetectedSourceUpdate",
        "type": "object"
      },
      "DigestAutonomyOut": {
        "properties": {
          "autonomous": {
            "description": "Of those, the ones decided with no person.",
            "title": "Autonomous",
            "type": "integer"
          },
          "autonomous_rate": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`autonomous / events`, 0 to 1 to four places; null with no events.",
            "title": "Autonomous Rate"
          },
          "events": {
            "description": "Economic events dated in the month.",
            "title": "Events",
            "type": "integer"
          },
          "founder_interventions_per_1000": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An owner's or admin's interventions per 1,000 events; null with no events.",
            "title": "Founder Interventions Per 1000"
          },
          "interventions_per_1000": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A person's interventions per 1,000 events; null with no events.",
            "title": "Interventions Per 1000"
          },
          "period_key": {
            "description": "The month the figures are for: last month, which is complete.",
            "title": "Period Key",
            "type": "string"
          }
        },
        "required": [
          "period_key",
          "events",
          "autonomous",
          "autonomous_rate",
          "interventions_per_1000",
          "founder_interventions_per_1000"
        ],
        "title": "DigestAutonomyOut",
        "type": "object"
      },
      "DigestMonthOut": {
        "properties": {
          "can_close": {
            "description": "Whether closing the month would succeed without an override.",
            "title": "Can Close",
            "type": "boolean"
          },
          "closed": {
            "description": "True once the month is closed (`soft_closed` or `locked`).",
            "title": "Closed",
            "type": "boolean"
          },
          "needs_person": {
            "description": "Items in attention, whoever they wait on.",
            "title": "Needs Person",
            "type": "integer"
          },
          "needs_you": {
            "description": "Of those, the ones only the business can answer: a question asked of it, a connection that needs it to sign in.",
            "title": "Needs You",
            "type": "integer"
          },
          "percent": {
            "description": "How much of the month's work is done, 0 to 100 to one place, as `/books/readiness` counts it.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Percent",
            "type": "string"
          },
          "period_key": {
            "description": "The month, as `2026-09`.",
            "title": "Period Key",
            "type": "string"
          },
          "period_status": {
            "description": "`open`, `soft_closed` or `locked`.",
            "title": "Period Status",
            "type": "string"
          },
          "starts_on": {
            "description": "The month's first day.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          }
        },
        "required": [
          "period_key",
          "starts_on",
          "period_status",
          "closed",
          "percent",
          "can_close",
          "needs_person",
          "needs_you"
        ],
        "title": "DigestMonthOut",
        "type": "object"
      },
      "DigestReviewingOut": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The figure that tripped it, when it has one.",
            "title": "Amount"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That figure's currency.",
            "title": "Currency"
          },
          "id": {
            "description": "The Inbox item the daily check raised.",
            "examples": [
              "exc_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "exc"
          },
          "kind": {
            "description": "The check that found it: `unusual_amount`, `stale_clearing`, `unmatched_transfer`, `possible_repeat`, `account_swing` or `missing_accrual`.",
            "title": "Kind",
            "type": "string"
          },
          "raised_at": {
            "description": "When the check raised it.",
            "format": "date-time",
            "title": "Raised At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "amount",
          "currency",
          "raised_at"
        ],
        "title": "DigestReviewingOut",
        "type": "object"
      },
      "DigestRunwayOut": {
        "properties": {
          "as_of": {
            "description": "The day cash is read at: today on the company's clock.",
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "burning": {
            "description": "Whether the trailing net burn is above zero.",
            "title": "Burning",
            "type": "boolean"
          },
          "cash": {
            "description": "Cash in the books' currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cash",
            "type": "string"
          },
          "currency": {
            "description": "The books' currency, ISO 4217.",
            "title": "Currency",
            "type": "string"
          },
          "runway_months": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months of cash at that burn, to one place; null when the books are not burning cash.",
            "title": "Runway Months"
          },
          "trailing_net_burn": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Average net burn of the last complete months (up to 3); null with no history.",
            "title": "Trailing Net Burn"
          }
        },
        "required": [
          "as_of",
          "currency",
          "cash",
          "trailing_net_burn",
          "runway_months",
          "burning"
        ],
        "title": "DigestRunwayOut",
        "type": "object"
      },
      "DimensionChanges": {
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "DimensionChanges",
        "type": "object"
      },
      "DimensionOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `dim_`.",
            "examples": [
              "dim_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "dim"
          },
          "key": {
            "description": "What an API caller names it by, e.g. `department`. Never changes.",
            "title": "Key",
            "type": "string"
          },
          "name": {
            "description": "What a person reads, e.g. Department.",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "name",
          "created_at"
        ],
        "title": "DimensionOut",
        "type": "object"
      },
      "DimensionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DimensionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DimensionPage",
        "type": "object"
      },
      "DimensionValueChanges": {
        "description": "Only the fields sent change; `parent_id: null` moves it to the top.",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          }
        },
        "title": "DimensionValueChanges",
        "type": "object"
      },
      "DimensionValueOut": {
        "properties": {
          "code": {
            "description": "Unique within the dimension, e.g. ENG. Never changes.",
            "title": "Code",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "dimension_id": {
            "description": "An id that starts with `dim_`.",
            "examples": [
              "dim_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Dimension Id",
            "type": "string",
            "x-id-prefix": "dim"
          },
          "id": {
            "description": "An id that starts with `dimv_`.",
            "examples": [
              "dimv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "dimv"
          },
          "name": {
            "description": "What a person reads, e.g. Engineering.",
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The value of the same dimension this one sits under.",
            "title": "Parent Id"
          }
        },
        "required": [
          "id",
          "dimension_id",
          "code",
          "name",
          "parent_id",
          "created_at"
        ],
        "title": "DimensionValueOut",
        "type": "object"
      },
      "DimensionValuePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DimensionValueOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DimensionValuePage",
        "type": "object"
      },
      "DisplayOrderIn": {
        "description": "A new order for the banks on the Bank accounts page, for one bank's\naccounts, or both. Each list is the whole order of what it covers, first\nto last; either may be left out.",
        "properties": {
          "connection_ids": {
            "anyOf": [
              {
                "items": {
                  "description": "An id that starts with `conn_`.",
                  "examples": [
                    "conn_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "conn"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Every bank (connection) in its new order.",
            "title": "Connection Ids"
          },
          "external_account_ids": {
            "anyOf": [
              {
                "items": {
                  "description": "An id that starts with `acct_`.",
                  "examples": [
                    "acct_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "acct"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "One bank's accounts in their new order. They must all come from one connection.",
            "title": "External Account Ids"
          }
        },
        "title": "DisplayOrderIn",
        "type": "object"
      },
      "DisplayOrderOut": {
        "description": "The order the books' Bank accounts page shows banks and accounts in.\n\nOnly what was placed is listed; anything else follows, in the order it\nwas found. Accounts compare only within their own bank.",
        "properties": {
          "connection_ids": {
            "description": "The placed banks (connections), first to last.",
            "items": {
              "description": "An id that starts with `conn_`.",
              "examples": [
                "conn_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "conn"
            },
            "title": "Connection Ids",
            "type": "array"
          },
          "external_account_ids": {
            "description": "The placed accounts, first to last within each bank.",
            "items": {
              "description": "An id that starts with `acct_`.",
              "examples": [
                "acct_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "acct"
            },
            "title": "External Account Ids",
            "type": "array"
          }
        },
        "required": [
          "connection_ids",
          "external_account_ids"
        ],
        "title": "DisplayOrderOut",
        "type": "object"
      },
      "DisposalIn": {
        "properties": {
          "disposed_on": {
            "description": "The day it was sold, scrapped or given away.",
            "format": "date",
            "title": "Disposed On",
            "type": "string"
          },
          "gain_loss_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the gain or loss goes; 7500 Gain or loss on disposal of assets when left out.",
            "title": "Gain Loss Account Id"
          },
          "proceeds": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "description": "What it brought in. Leave it at zero when the money arrives through a connected bank, and file that deposit to gain or loss on disposal.",
            "title": "Proceeds"
          },
          "proceeds_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the proceeds went; needed when there are any.",
            "title": "Proceeds Account Id"
          }
        },
        "required": [
          "disposed_on"
        ],
        "title": "DisposalIn",
        "type": "object"
      },
      "DocumentLink": {
        "properties": {
          "stored": {
            "title": "Stored",
            "type": "boolean"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "stored"
        ],
        "title": "DocumentLink",
        "type": "object"
      },
      "DocumentOut": {
        "properties": {
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Type"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `doc_`.",
            "examples": [
              "doc_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "doc"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "stored": {
            "title": "Stored",
            "type": "boolean"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "required": [
          "id",
          "kind",
          "source",
          "url",
          "stored",
          "content_type",
          "created_at"
        ],
        "title": "DocumentOut",
        "type": "object"
      },
      "DocumentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DocumentRecordOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DocumentPage",
        "type": "object"
      },
      "DocumentRecordOut": {
        "description": "A receipt or an invoice, and what it supports.",
        "properties": {
          "byte_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The file's size in bytes, once our copy exists.",
            "title": "Byte Size"
          },
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The file's media type, once known.",
            "title": "Content Type"
          },
          "created_at": {
            "description": "When it reached these books.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "extraction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExtractionOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "What was read off it \u2014 merchant, date, total, currency and tax \u2014 once read."
          },
          "id": {
            "description": "An id that starts with `doc_`.",
            "examples": [
              "doc_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "doc"
          },
          "kind": {
            "description": "One of receipt, invoice.",
            "title": "Kind",
            "type": "string"
          },
          "source": {
            "description": "The connector it came from, such as `brex`, or `upload`.",
            "title": "Source",
            "type": "string"
          },
          "stored": {
            "description": "Whether our own copy exists. Open the file through the app either way.",
            "title": "Stored",
            "type": "boolean"
          },
          "transactions": {
            "description": "The transactions it supports, oldest first. Empty while it supports none.",
            "items": {
              "$ref": "#/components/schemas/SupportedTransactionOut"
            },
            "title": "Transactions",
            "type": "array"
          }
        },
        "required": [
          "id",
          "kind",
          "source",
          "content_type",
          "byte_size",
          "stored",
          "created_at",
          "transactions",
          "extraction"
        ],
        "title": "DocumentRecordOut",
        "type": "object"
      },
      "DraftChange": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "entry_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Date"
          },
          "lines": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/NewDraftLine"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lines"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "row_version": {
            "description": "The version you read; a stale one is refused.",
            "title": "Row Version",
            "type": "integer"
          }
        },
        "required": [
          "row_version"
        ],
        "title": "DraftChange",
        "type": "object"
      },
      "DraftLineOut": {
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "dimensions": {
            "description": "The line's value for each dimension it names, by key.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "foreign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForeignOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the line moved in, when not the books' own currency. Kept as given: whether `amount` is that amount at that rate is asked when the draft posts."
          },
          "line_no": {
            "title": "Line No",
            "type": "integer"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the line is with.",
            "title": "Party Id"
          }
        },
        "required": [
          "line_no",
          "account_id",
          "account_code",
          "account_name",
          "direction",
          "amount",
          "memo"
        ],
        "title": "DraftLineOut",
        "type": "object"
      },
      "DraftOut": {
        "properties": {
          "balanced": {
            "description": "Whether it would post as it stands: two lines or more, and equal sides.",
            "title": "Balanced",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "credits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Credits",
            "type": "string"
          },
          "debits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Debits",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `draft_`.",
            "examples": [
              "draft_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "draft"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/DraftLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "row_version": {
            "description": "Send it back with a change or a post; a stale one is refused with draft_changed.",
            "title": "Row Version",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "entry_date",
          "description",
          "memo",
          "row_version",
          "created_at",
          "updated_at",
          "lines",
          "debits",
          "credits",
          "balanced"
        ],
        "title": "DraftOut",
        "type": "object"
      },
      "DraftPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DraftOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DraftPage",
        "type": "object"
      },
      "DraftVersion": {
        "properties": {
          "row_version": {
            "description": "The version you read; a stale one is refused.",
            "title": "Row Version",
            "type": "integer"
          }
        },
        "required": [
          "row_version"
        ],
        "title": "DraftVersion",
        "type": "object"
      },
      "EliminationOut": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "due_from": {
            "description": "What came off the due-from, translated.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Due From",
            "type": "string"
          },
          "due_to": {
            "description": "What came off the due-to, translated.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Due To",
            "type": "string"
          },
          "transaction_date": {
            "format": "date",
            "title": "Transaction Date",
            "type": "string"
          },
          "transaction_id": {
            "description": "The intercompany transaction.",
            "examples": [
              "ic_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Transaction Id",
            "type": "string",
            "x-id-prefix": "ic"
          }
        },
        "required": [
          "transaction_id",
          "transaction_date",
          "description",
          "due_from",
          "due_to"
        ],
        "title": "EliminationOut",
        "type": "object"
      },
      "EntityRef": {
        "properties": {
          "id": {
            "description": "An id that starts with `ent_`.",
            "examples": [
              "ent_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "ent"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "EntityRef",
        "type": "object"
      },
      "EntryBatch": {
        "properties": {
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/EntryOut"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "currency",
          "data"
        ],
        "title": "EntryBatch",
        "type": "object"
      },
      "EntryImportOut": {
        "description": "Where the transactions behind an entry were brought in from, and by\nwhom: the answer to \"imported from where?\".",
        "properties": {
          "actor_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That member's profile picture, when they have one.",
            "title": "Actor Avatar Url"
          },
          "actor_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That member's email, while they are still in the books.",
            "title": "Actor Email"
          },
          "actor_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member, when one did.",
            "title": "Actor Id"
          },
          "actor_kind": {
            "description": "`user` when a member brought it in, `system` when a connection synced it.",
            "enum": [
              "user",
              "system",
              "model"
            ],
            "title": "Actor Kind",
            "type": "string"
          },
          "actor_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That member's name, when known.",
            "title": "Actor Name"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The import's own name: an uploaded file's name.",
            "title": "Label"
          },
          "source": {
            "description": "The connector it came from, such as `stripe`, or the format of a statement file a person uploaded, such as `csv`.",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "source",
          "actor_kind"
        ],
        "title": "EntryImportOut",
        "type": "object"
      },
      "EntryLineOut": {
        "properties": {
          "account_id": {
            "description": "The GL account, prefixed.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "account_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account's code and name.",
            "title": "Account Label"
          },
          "amount": {
            "description": "A decimal string.",
            "title": "Amount",
            "type": "string"
          },
          "direction": {
            "description": "`debit` or `credit`.",
            "title": "Direction",
            "type": "string"
          },
          "side": {
            "description": "`+` a line written, `-` a line taken back.",
            "enum": [
              "+",
              "-"
            ],
            "title": "Side",
            "type": "string"
          }
        },
        "required": [
          "side",
          "direction",
          "account_id",
          "amount"
        ],
        "title": "EntryLineOut",
        "type": "object"
      },
      "EntryOriginOut": {
        "description": "What an entry was posted from: the step back from the books toward\nthe evidence.",
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "description": "The transaction's id, or the schedule's.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "kind": {
            "description": "`transaction`: a bank, card or processor movement that was filed. `schedule`: one period of a recognition schedule.",
            "enum": [
              "transaction",
              "schedule"
            ],
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "description"
        ],
        "title": "EntryOriginOut",
        "type": "object"
      },
      "EntryOut": {
        "properties": {
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the entry was posted.",
            "title": "Created At"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "documents": {
            "description": "The receipts and invoices attached to the transactions the entry was posted from, oldest first. Empty for an entry with no transaction behind it.",
            "items": {
              "$ref": "#/components/schemas/DocumentOut"
            },
            "title": "Documents",
            "type": "array"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "entry_kind": {
            "description": "What produced the entry: manual, system, adjusting, opening, closing or reversal.",
            "title": "Entry Kind",
            "type": "string"
          },
          "entry_no": {
            "title": "Entry No",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `je_`.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "imported": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EntryImportOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the entry's transactions were imported from and who brought them in. Null for an entry with no imported transaction behind it."
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/LineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "origins": {
            "description": "What the entry was posted from. Empty for an entry written by hand, an opening or closing entry, and a reversal.",
            "items": {
              "$ref": "#/components/schemas/EntryOriginOut"
            },
            "title": "Origins",
            "type": "array"
          },
          "period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The accounting period the entry is in, as `YYYY-MM`.",
            "title": "Period"
          },
          "replaced_by_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry an edit posted in this one's place.",
            "title": "Replaced By Entry Id"
          },
          "replaced_by_entry_no": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "That replacement's number, as people cite it.",
            "title": "Replaced By Entry No"
          },
          "replaces_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set on an entry an edit posted, naming the entry it stands in for.",
            "title": "Replaces Entry Id"
          },
          "replaces_entry_no": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The number of the entry this one replaced, as people cite it.",
            "title": "Replaces Entry No"
          },
          "reversed_by_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry that reverses this one, when it has been reversed.",
            "title": "Reversed By Entry Id"
          },
          "reversed_by_entry_no": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "That reversal's number, as people cite it.",
            "title": "Reversed By Entry No"
          },
          "reverses_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reverses Entry Id"
          },
          "reverses_entry_no": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The number of the entry a reversal undoes, as people cite it.",
            "title": "Reverses Entry No"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "enum": [
              "posted",
              "reversed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "entry_no",
          "entry_date",
          "description",
          "memo",
          "source",
          "entry_kind",
          "status",
          "reverses_entry_id",
          "replaces_entry_id",
          "amount",
          "lines"
        ],
        "title": "EntryOut",
        "type": "object"
      },
      "EntryPage": {
        "properties": {
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/EntryOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "currency",
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "EntryPage",
        "type": "object"
      },
      "EquityAwardChange": {
        "description": "Only what is sent changes. Terms change only while none of its\nexpense is in the books.",
        "properties": {
          "cliff_months": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cliff Months"
          },
          "department_value_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "title": "Department Value Id"
          },
          "expense_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expense Account Id"
          },
          "fair_value": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fair Value"
          },
          "grant_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Date"
          },
          "holder_party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Holder Party Id"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "reserve_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reserve Account Id"
          },
          "shares": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shares"
          },
          "type": {
            "anyOf": [
              {
                "enum": [
                  "iso",
                  "nso",
                  "rsa",
                  "rsu"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "vesting_months": {
            "anyOf": [
              {
                "maximum": 240.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vesting Months"
          },
          "vesting_starts_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vesting Starts On"
          }
        },
        "title": "EquityAwardChange",
        "type": "object"
      },
      "EquityAwardCreate": {
        "properties": {
          "cliff_months": {
            "default": 12,
            "description": "Months before anything vests; 0 for no cliff.",
            "minimum": 0.0,
            "title": "Cliff Months",
            "type": "integer"
          },
          "department_value_id": {
            "description": "The department its expense belongs to: a value of `department`.",
            "examples": [
              "dimv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Department Value Id",
            "type": "string",
            "x-id-prefix": "dimv"
          },
          "expense_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where it is expensed; 6295 Stock-based compensation when left out.",
            "title": "Expense Account Id"
          },
          "fair_value": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "One share's fair value on the grant date: an option's Black-Scholes value, an RSU's price.",
            "title": "Fair Value"
          },
          "grant_date": {
            "description": "The day the board granted it.",
            "format": "date",
            "title": "Grant Date",
            "type": "string"
          },
          "holder_party_id": {
            "description": "Who holds it: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Holder Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "reserve_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it is expensed against; 3400 Stock-based compensation reserve when left out.",
            "title": "Reserve Account Id"
          },
          "shares": {
            "description": "How many shares it grants.",
            "exclusiveMinimum": 0.0,
            "title": "Shares",
            "type": "integer"
          },
          "type": {
            "description": "`iso`, `nso`, `rsa` or `rsu`.",
            "enum": [
              "iso",
              "nso",
              "rsa",
              "rsu"
            ],
            "title": "Type",
            "type": "string"
          },
          "vesting_months": {
            "default": 48,
            "description": "How many months it vests over.",
            "maximum": 240.0,
            "minimum": 1.0,
            "title": "Vesting Months",
            "type": "integer"
          },
          "vesting_starts_on": {
            "description": "The vesting start date.",
            "format": "date",
            "title": "Vesting Starts On",
            "type": "string"
          }
        },
        "required": [
          "holder_party_id",
          "type",
          "grant_date",
          "shares",
          "fair_value",
          "vesting_starts_on",
          "department_value_id"
        ],
        "title": "EquityAwardCreate",
        "type": "object"
      },
      "EquityAwardDetailOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "department": {
            "$ref": "#/components/schemas/DepartmentRef",
            "description": "The department its expense is reported under."
          },
          "expense_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where it is expensed, 6295 Stock-based compensation by default."
          },
          "expensed": {
            "description": "What the closes have expensed for it so far.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Expensed",
            "type": "string"
          },
          "fair_value": {
            "description": "One share's fair value on the grant date, in the books' currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Fair Value",
            "type": "string"
          },
          "forfeited_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it was forfeited.",
            "title": "Forfeited On"
          },
          "grant_date": {
            "description": "The day the board granted it. Nothing is expensed before it.",
            "format": "date",
            "title": "Grant Date",
            "type": "string"
          },
          "grant_value": {
            "description": "Shares times fair value: what it costs in all if it fully vests.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Grant Value",
            "type": "string"
          },
          "holder": {
            "$ref": "#/components/schemas/HolderRef",
            "description": "Who holds it: a person among the books' counterparties."
          },
          "id": {
            "description": "An id that starts with `award_`.",
            "examples": [
              "award_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "award"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "months": {
            "description": "Every month from the grant to the last vesting date (or the forfeiture), oldest first.",
            "items": {
              "$ref": "#/components/schemas/AwardMonthOut"
            },
            "title": "Months",
            "type": "array"
          },
          "reserve_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "What it is expensed against, 3400 by default."
          },
          "runs": {
            "description": "Every close that expensed it, oldest first.",
            "items": {
              "$ref": "#/components/schemas/AwardRunOut"
            },
            "title": "Runs",
            "type": "array"
          },
          "shares": {
            "description": "How many shares it grants.",
            "title": "Shares",
            "type": "integer"
          },
          "status": {
            "description": "`active`, or `forfeited` once the holder left before it all vested.",
            "enum": [
              "active",
              "forfeited"
            ],
            "title": "Status",
            "type": "string"
          },
          "type": {
            "description": "`iso` incentive stock option, `nso` non-qualified option, `rsa` restricted stock award, `rsu` restricted stock unit.",
            "enum": [
              "iso",
              "nso",
              "rsa",
              "rsu"
            ],
            "title": "Type",
            "type": "string"
          },
          "vested_shares": {
            "description": "Shares vested today.",
            "title": "Vested Shares",
            "type": "integer"
          },
          "vesting_schedule": {
            "$ref": "#/components/schemas/VestingSchedule"
          },
          "vests_fully_on": {
            "description": "The day its last shares vest.",
            "format": "date",
            "title": "Vests Fully On",
            "type": "string"
          }
        },
        "required": [
          "id",
          "holder",
          "type",
          "status",
          "grant_date",
          "shares",
          "fair_value",
          "grant_value",
          "currency",
          "vesting_schedule",
          "vests_fully_on",
          "vested_shares",
          "department",
          "expense_account",
          "reserve_account",
          "expensed",
          "forfeited_on",
          "memo",
          "created_at",
          "months",
          "runs"
        ],
        "title": "EquityAwardDetailOut",
        "type": "object"
      },
      "EquityAwardOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "department": {
            "$ref": "#/components/schemas/DepartmentRef",
            "description": "The department its expense is reported under."
          },
          "expense_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where it is expensed, 6295 Stock-based compensation by default."
          },
          "expensed": {
            "description": "What the closes have expensed for it so far.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Expensed",
            "type": "string"
          },
          "fair_value": {
            "description": "One share's fair value on the grant date, in the books' currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Fair Value",
            "type": "string"
          },
          "forfeited_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it was forfeited.",
            "title": "Forfeited On"
          },
          "grant_date": {
            "description": "The day the board granted it. Nothing is expensed before it.",
            "format": "date",
            "title": "Grant Date",
            "type": "string"
          },
          "grant_value": {
            "description": "Shares times fair value: what it costs in all if it fully vests.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Grant Value",
            "type": "string"
          },
          "holder": {
            "$ref": "#/components/schemas/HolderRef",
            "description": "Who holds it: a person among the books' counterparties."
          },
          "id": {
            "description": "An id that starts with `award_`.",
            "examples": [
              "award_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "award"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "reserve_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "What it is expensed against, 3400 by default."
          },
          "shares": {
            "description": "How many shares it grants.",
            "title": "Shares",
            "type": "integer"
          },
          "status": {
            "description": "`active`, or `forfeited` once the holder left before it all vested.",
            "enum": [
              "active",
              "forfeited"
            ],
            "title": "Status",
            "type": "string"
          },
          "type": {
            "description": "`iso` incentive stock option, `nso` non-qualified option, `rsa` restricted stock award, `rsu` restricted stock unit.",
            "enum": [
              "iso",
              "nso",
              "rsa",
              "rsu"
            ],
            "title": "Type",
            "type": "string"
          },
          "vested_shares": {
            "description": "Shares vested today.",
            "title": "Vested Shares",
            "type": "integer"
          },
          "vesting_schedule": {
            "$ref": "#/components/schemas/VestingSchedule"
          },
          "vests_fully_on": {
            "description": "The day its last shares vest.",
            "format": "date",
            "title": "Vests Fully On",
            "type": "string"
          }
        },
        "required": [
          "id",
          "holder",
          "type",
          "status",
          "grant_date",
          "shares",
          "fair_value",
          "grant_value",
          "currency",
          "vesting_schedule",
          "vests_fully_on",
          "vested_shares",
          "department",
          "expense_account",
          "reserve_account",
          "expensed",
          "forfeited_on",
          "memo",
          "created_at"
        ],
        "title": "EquityAwardOut",
        "type": "object"
      },
      "EquityAwardPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/EquityAwardOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "EquityAwardPage",
        "type": "object"
      },
      "ErrorBody": {
        "description": "What every non-2xx ``/v1`` response carries.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorBody",
        "type": "object"
      },
      "ErrorDetail": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Param"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "code",
          "message"
        ],
        "title": "ErrorDetail",
        "type": "object"
      },
      "EscalateException": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the owner should know: the question only they can answer.",
            "title": "Note"
          }
        },
        "title": "EscalateException",
        "type": "object"
      },
      "EventOut": {
        "properties": {
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "detail": {
            "additionalProperties": true,
            "description": "How it was worked out: for a conversion, the prices, the shares and par; for interest, the days (`from`, `through`, `days`), the principal and the rate; for a repayment, its principal and interest.",
            "title": "Detail",
            "type": "object"
          },
          "effective_on": {
            "format": "date",
            "title": "Effective On",
            "type": "string"
          },
          "entry_id": {
            "description": "An id that starts with `je_`.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "id": {
            "description": "An id that starts with `fin_evt_`.",
            "examples": [
              "fin_evt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "fin_evt"
          },
          "kind": {
            "description": "`issued`, `interest_accrued`, `repaid` or `converted`.",
            "title": "Kind",
            "type": "string"
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "effective_on",
          "amount",
          "entry_id",
          "detail",
          "recorded_at"
        ],
        "title": "EventOut",
        "type": "object"
      },
      "EvidenceOut": {
        "description": "One thing the books knew about a transaction when it was researched.",
        "properties": {
          "account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account it points to: its code.",
            "title": "Account Code"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That account's name.",
            "title": "Account Name"
          },
          "count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "For `prior_filings`: how many times.",
            "title": "Count"
          },
          "kind": {
            "description": "What it is: `prior_filings` (the payee filed here before), `counterparty_default` (the account a person set for the payee), `rule_near_miss` (a rule whose pattern matched but whose conditions did not), `document` (an attached receipt or invoice), `source_record` (what the card program said) or `similar_transaction` (another payee's transaction like it).",
            "enum": [
              "prior_filings",
              "counterparty_default",
              "rule_near_miss",
              "document",
              "source_record",
              "similar_transaction"
            ],
            "title": "Kind",
            "type": "string"
          },
          "note": {
            "description": "The line the model was shown, in English.",
            "title": "Note",
            "type": "string"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The record it is about, by kind: a GL account, a rule, a document, a source record or a transaction.",
            "title": "Ref"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For `prior_filings`, the first such filing; for `similar_transaction`, its date. ISO 8601.",
            "title": "Since"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The words quoted: what a receipt says, the card program's category, the rule's name or the other transaction's description.",
            "title": "Text"
          }
        },
        "required": [
          "kind",
          "note"
        ],
        "title": "EvidenceOut",
        "type": "object"
      },
      "ExceptionAmountOut": {
        "properties": {
          "amount": {
            "description": "What the open items in this currency add up to.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "currency": {
            "description": "The currency, as an ISO 4217 code.",
            "title": "Currency",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "amount"
        ],
        "title": "ExceptionAmountOut",
        "type": "object"
      },
      "ExceptionCountsOut": {
        "description": "The open queue in totals: one per whom it waits on. Items the agent is\nstill working are in none of them.",
        "properties": {
          "has_reviewer": {
            "description": "Whether someone other than the business reviews these books: an accountant member, or an accounting firm the organization let in. Only then can an item be sent to the reviewer.",
            "title": "Has Reviewer",
            "type": "boolean"
          },
          "views": {
            "description": "One per whom open items wait on, always all three, in the order `owner`, `reviewer`, `third_party`.",
            "items": {
              "$ref": "#/components/schemas/ExceptionViewCountOut"
            },
            "title": "Views",
            "type": "array"
          }
        },
        "required": [
          "has_reviewer",
          "views"
        ],
        "title": "ExceptionCountsOut",
        "type": "object"
      },
      "ExceptionItemOut": {
        "description": "An exception as the queue lists it: with what it is about, by name.",
        "properties": {
          "amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The money at stake: the amount of the transaction it is about.",
            "title": "Amount"
          },
          "ask_reason": {
            "description": "Why it needs a person: `needs_category`, `needs_receipt`, `needs_match`, `needs_business_intent`, `needs_approval` or `data_problem`.",
            "enum": [
              "needs_category",
              "needs_receipt",
              "needs_match",
              "needs_business_intent",
              "needs_approval",
              "data_problem"
            ],
            "title": "Ask Reason",
            "type": "string"
          },
          "assigned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned At"
          },
          "assigned_to": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member working it: their user id.",
            "title": "Assigned To"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "The counterparty it is about, the same one the logo is of: the one its detail names, the transaction's, or the counterparty itself. Null for none.",
            "title": "Counterparty Id"
          },
          "counterparty_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The logo of whoever it is about: the counterparty it names, the transaction's or the counterparty itself. Null for none, or initials.",
            "title": "Counterparty Logo Url"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That amount's currency.",
            "title": "Currency"
          },
          "detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "escalated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was last handed between the owner and the reviewer, either way (`waiting_on` says which); null if it never was.",
            "title": "Escalated At"
          },
          "escalated_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who handed it over. Null when the books handed it to the owner, after it waited three days on the reviewer.",
            "title": "Escalated By"
          },
          "escalation_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What they wrote with it, to the owner or to the reviewer.",
            "title": "Escalation Note"
          },
          "id": {
            "description": "An id that starts with `exc_`.",
            "examples": [
              "exc_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "exc"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "occurred_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day the transaction it is about happened. Null when it is not about a transaction.",
            "title": "Occurred On"
          },
          "paid_with": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name of the bank account or card the transaction came from, as its provider names it. Null when it is not about a transaction, or nothing connected reported it.",
            "title": "Paid With"
          },
          "paid_with_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GL account that account or card posts to, so its name links to it. Null when it is not mapped to one, or nothing connected reported it.",
            "title": "Paid With Account Id"
          },
          "paid_with_mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last digits of that account or card, when its provider gives them.",
            "title": "Paid With Mask"
          },
          "recommendation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecommendationOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the books would file it as. Null when they have no answer."
          },
          "researched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the books last researched it before asking; null until they have.",
            "title": "Researched At"
          },
          "resolution_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What whoever resolved or dismissed it wrote.",
            "title": "Resolution Note"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "resolved_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The person who resolved or dismissed it, by filing or excluding the transaction or from the queue. Null when the books resolved it on their own.",
            "title": "Resolved By"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subject_id": {
            "description": "An id. Which resource it names is given by the field beside it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The record as a person names it: a transaction's description, an account's code and name. Null for the books as a whole, or a record that is gone.",
            "title": "Subject Label"
          },
          "subject_type": {
            "title": "Subject Type",
            "type": "string"
          },
          "waiting_on": {
            "description": "Whose answer it waits for: `agent`, `reviewer` (the books' accountant or firm), `owner` (the business) or `third_party`.",
            "enum": [
              "agent",
              "reviewer",
              "owner",
              "third_party"
            ],
            "title": "Waiting On",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "severity",
          "subject_type",
          "subject_id",
          "detail",
          "status",
          "created_at",
          "ask_reason",
          "waiting_on"
        ],
        "title": "ExceptionItemOut",
        "type": "object"
      },
      "ExceptionOut": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The money at stake: the amount of the transaction it is about.",
            "title": "Amount"
          },
          "ask_reason": {
            "description": "Why it needs a person: `needs_category`, `needs_receipt`, `needs_match`, `needs_business_intent`, `needs_approval` or `data_problem`.",
            "enum": [
              "needs_category",
              "needs_receipt",
              "needs_match",
              "needs_business_intent",
              "needs_approval",
              "data_problem"
            ],
            "title": "Ask Reason",
            "type": "string"
          },
          "assigned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned At"
          },
          "assigned_to": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member working it: their user id.",
            "title": "Assigned To"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That amount's currency.",
            "title": "Currency"
          },
          "detail": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "escalated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was last handed between the owner and the reviewer, either way (`waiting_on` says which); null if it never was.",
            "title": "Escalated At"
          },
          "escalated_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who handed it over. Null when the books handed it to the owner, after it waited three days on the reviewer.",
            "title": "Escalated By"
          },
          "escalation_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What they wrote with it, to the owner or to the reviewer.",
            "title": "Escalation Note"
          },
          "id": {
            "description": "An id that starts with `exc_`.",
            "examples": [
              "exc_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "exc"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "recommendation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecommendationOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the books would file it as. Null when they have no answer."
          },
          "researched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the books last researched it before asking; null until they have.",
            "title": "Researched At"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subject_id": {
            "description": "An id. Which resource it names is given by the field beside it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_type": {
            "title": "Subject Type",
            "type": "string"
          },
          "waiting_on": {
            "description": "Whose answer it waits for: `agent`, `reviewer` (the books' accountant or firm), `owner` (the business) or `third_party`.",
            "enum": [
              "agent",
              "reviewer",
              "owner",
              "third_party"
            ],
            "title": "Waiting On",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "severity",
          "subject_type",
          "subject_id",
          "detail",
          "status",
          "created_at",
          "ask_reason",
          "waiting_on"
        ],
        "title": "ExceptionOut",
        "type": "object"
      },
      "ExceptionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ExceptionItemOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ExceptionPage",
        "type": "object"
      },
      "ExceptionViewCountOut": {
        "properties": {
          "amounts": {
            "description": "The money at stake in them, summed per currency, in currency order. Items with no amount are counted but add nothing.",
            "items": {
              "$ref": "#/components/schemas/ExceptionAmountOut"
            },
            "title": "Amounts",
            "type": "array"
          },
          "count": {
            "description": "How many open items wait on this.",
            "title": "Count",
            "type": "integer"
          },
          "waiting_on": {
            "description": "Whom these items wait on: `owner`, `reviewer` or `third_party`.",
            "enum": [
              "owner",
              "reviewer",
              "third_party"
            ],
            "title": "Waiting On",
            "type": "string"
          }
        },
        "required": [
          "waiting_on",
          "count",
          "amounts"
        ],
        "title": "ExceptionViewCountOut",
        "type": "object"
      },
      "Exclude": {
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "Exclude",
        "type": "object"
      },
      "ExplanationAccountOut": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "name"
        ],
        "title": "ExplanationAccountOut",
        "type": "object"
      },
      "ExplanationLineOut": {
        "description": "One journal line behind the figure, with the entry it belongs to and\nthe evidence behind that entry.",
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "document_ids": {
            "description": "The receipts and invoices that support them.",
            "items": {
              "description": "An id that starts with `doc_`.",
              "examples": [
                "doc_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "doc"
            },
            "title": "Document Ids",
            "type": "array"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "entry_id": {
            "description": "The journal entry to cite.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "entry_no": {
            "title": "Entry No",
            "type": "integer"
          },
          "line_id": {
            "description": "An id that starts with `jel_`.",
            "examples": [
              "jel_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Line Id",
            "type": "string",
            "x-id-prefix": "jel"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "signed_amount": {
            "description": "`amount` signed in the account type's normal direction.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Signed Amount",
            "type": "string"
          },
          "source": {
            "description": "How the entry was written: `ingest`, `manual`, `schedule`, \u2026",
            "title": "Source",
            "type": "string"
          },
          "transaction_ids": {
            "description": "The bank, card or processor transactions the entry was filed from.",
            "items": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "txn"
            },
            "title": "Transaction Ids",
            "type": "array"
          }
        },
        "required": [
          "line_id",
          "entry_id",
          "entry_no",
          "entry_date",
          "description",
          "memo",
          "source",
          "account_id",
          "direction",
          "amount",
          "signed_amount",
          "transaction_ids",
          "document_ids"
        ],
        "title": "ExplanationLineOut",
        "type": "object"
      },
      "ExplanationOut": {
        "description": "Why a figure in a kept report is what it is: the journal lines it adds\nup from, read through the same posting sequence the report was, so they\nadd up to the kept figure after any later posting or reopen.",
        "properties": {
          "accounts": {
            "description": "The accounts the figure is read from: the account and every account beneath it, or every cash account.",
            "items": {
              "$ref": "#/components/schemas/ExplanationAccountOut"
            },
            "title": "Accounts",
            "type": "array"
          },
          "closing_balance": {
            "description": "The balance on `until`, as posted through the sequence.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Closing Balance",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "figure": {
            "description": "What the report says: the closing balance, or what moved.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Figure",
            "type": "string"
          },
          "kind": {
            "description": "`balance`: the figure is the accounts' balance on `until`, the opening balance plus the lines from `since`. `movement`: the figure is what the lines moved from `since` to `until`.",
            "enum": [
              "balance",
              "movement"
            ],
            "title": "Kind",
            "type": "string"
          },
          "lines": {
            "description": "Oldest first.",
            "items": {
              "$ref": "#/components/schemas/ExplanationLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "opening_balance": {
            "description": "The balance before `since`, as posted through the sequence.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Opening Balance",
            "type": "string"
          },
          "report": {
            "enum": [
              "trial_balance",
              "balance_sheet",
              "income_statement",
              "cash_flow",
              "board_pack"
            ],
            "title": "Report",
            "type": "string"
          },
          "report_run_id": {
            "description": "An id that starts with `rpt_run_`.",
            "examples": [
              "rpt_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Report Run Id",
            "type": "string",
            "x-id-prefix": "rpt_run"
          },
          "since": {
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "subject": {
            "description": "What is explained: the account asked for, or a figure (`cash`, `mrr`).",
            "enum": [
              "account",
              "cash",
              "mrr"
            ],
            "title": "Subject",
            "type": "string"
          },
          "through_sequence": {
            "description": "Every line here was posted at or before this sequence.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "truncated": {
            "description": "True when older lines were left out; the opening balance is then what stood before the oldest line shown, so the lines still add up.",
            "title": "Truncated",
            "type": "boolean"
          },
          "until": {
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "report_run_id",
          "report",
          "through_sequence",
          "subject",
          "accounts",
          "kind",
          "currency",
          "since",
          "until",
          "opening_balance",
          "closing_balance",
          "figure",
          "lines",
          "truncated"
        ],
        "title": "ExplanationOut",
        "type": "object"
      },
      "ExternalAccountList": {
        "description": "A page of the books' bank accounts and cards.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SourceAccountOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ExternalAccountList",
        "type": "object"
      },
      "ExternalAccountVisibility": {
        "properties": {
          "hidden": {
            "description": "True folds the account away under its bank's hidden row on the Bank accounts page; false brings it back. Display only: it still syncs, posts and counts in every report.",
            "title": "Hidden",
            "type": "boolean"
          }
        },
        "required": [
          "hidden"
        ],
        "title": "ExternalAccountVisibility",
        "type": "object"
      },
      "ExtractedFieldOut": {
        "properties": {
          "confidence": {
            "description": "How sure the reader was, from 0 to 1.",
            "title": "Confidence",
            "type": "number"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where on the document it was read.",
            "title": "Location"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What was read, or null when the document does not show it.",
            "title": "Value"
          }
        },
        "required": [
          "value",
          "confidence",
          "location"
        ],
        "title": "ExtractedFieldOut",
        "type": "object"
      },
      "ExtractionOut": {
        "description": "What the extractor read off the document. Data only: it is matched\nagainst transactions and shown, never acted on.",
        "properties": {
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExtractedFieldOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "date": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExtractedFieldOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "extractor_version": {
            "title": "Extractor Version",
            "type": "string"
          },
          "merchant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExtractedFieldOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          },
          "tax": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExtractedFieldOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExtractedFieldOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "extractor_version",
          "merchant",
          "date",
          "total",
          "currency",
          "tax",
          "recorded_at"
        ],
        "title": "ExtractionOut",
        "type": "object"
      },
      "FileAsTransfer": {
        "properties": {
          "other_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The books' own account at the transfer's other end: a bank, card or other asset or liability account that is not connected. Leave it out to file against 1090 Cash in transit, opened on first use, which the other half clears once that account is connected.",
            "title": "Other Account Id"
          }
        },
        "title": "FileAsTransfer",
        "type": "object"
      },
      "FiledByRuleOut": {
        "description": "What asking about a transaction a rule already covers answers: it was\nfiled by that rule, and nobody was asked.",
        "properties": {
          "about": {
            "description": "Always `transaction`.",
            "title": "About",
            "type": "string"
          },
          "category_account_id": {
            "description": "The GL account it was filed to.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "outcome": {
            "const": "filed_by_rule",
            "description": "Always `filed_by_rule`: what tells this answer from a question.",
            "title": "Outcome",
            "type": "string"
          },
          "rule_id": {
            "description": "The rule that filed it.",
            "examples": [
              "rule_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Rule Id",
            "type": "string",
            "x-id-prefix": "rule"
          },
          "rule_name": {
            "description": "That rule's name.",
            "title": "Rule Name",
            "type": "string"
          },
          "subject_id": {
            "description": "The transaction, now filed.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "outcome",
          "about",
          "subject_id",
          "rule_id",
          "rule_name",
          "category_account_id"
        ],
        "title": "FiledByRuleOut",
        "type": "object"
      },
      "FilingReasonOut": {
        "description": "Why a decision was made, in parts a screen can put into its own words.",
        "properties": {
          "kind": {
            "description": "`rule`: a rule of these books matched. `model`: a model proposed it. `person`: someone chose it. `carried`: it was filed on the row this one replaced. `refund`: a refund files where its purchase did. `default`: what LedgerIt does with this kind of transaction when nothing else decides. `split`: someone filed it across several GL accounts, so the decision names none. `settles`: LedgerIt settled it against the one invoice or bill its description names, for exactly what was left on it. `own_company`: the other party is the company itself, so LedgerIt holds it in suspense as a transfer between its own accounts waiting for its other half; `text` is the name it matched. `transfer`: someone filed it as a transfer between the books' own accounts, so it files under no GL account. `financing`: it is the bank's side of a financing instrument's or an intercompany transaction's entry, which holds its cash.",
            "enum": [
              "rule",
              "model",
              "person",
              "carried",
              "refund",
              "default",
              "split",
              "settles",
              "own_company",
              "transfer",
              "financing"
            ],
            "title": "Kind",
            "type": "string"
          },
          "related_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction the decision came from: the row replaced, or the purchase refunded.",
            "title": "Related Event Id"
          },
          "rule_id": {
            "anyOf": [
              {
                "description": "An id that starts with `rule_`.",
                "examples": [
                  "rule_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "rule"
              },
              {
                "type": "null"
              }
            ],
            "description": "The rule that matched.",
            "title": "Rule Id"
          },
          "rule_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its name when it matched; the rule may have changed since.",
            "title": "Rule Name"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model's own reasoning, or the note the person left. Words written by a model or a person, never by LedgerIt.",
            "title": "Text"
          }
        },
        "required": [
          "kind"
        ],
        "title": "FilingReasonOut",
        "type": "object"
      },
      "FilingRefusal": {
        "description": "A transaction a bulk filing left as it was, and why.",
        "properties": {
          "code": {
            "description": "The same code filing it alone would be refused with.",
            "title": "Code",
            "type": "string"
          },
          "event_id": {
            "description": "An id that starts with `txn_`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Event Id",
            "type": "string",
            "x-id-prefix": "txn"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "code",
          "message"
        ],
        "title": "FilingRefusal",
        "type": "object"
      },
      "FilingRefusedOut": {
        "description": "Why an answer filed nothing, though it was kept.",
        "properties": {
          "code": {
            "description": "The refusal's code, as filing or writing the rule alone returns it.",
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "FilingRefusedOut",
        "type": "object"
      },
      "FixedAssetChange": {
        "description": "Only what is sent changes. Its terms stay as registered.",
        "properties": {
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "FixedAssetChange",
        "type": "object"
      },
      "FixedAssetCreate": {
        "properties": {
          "accumulated_depreciation_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where its depreciation builds up; 1610 Accumulated depreciation when left out.",
            "title": "Accumulated Depreciation Account Id"
          },
          "asset_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where its cost sits; 1600 Computer equipment when left out.",
            "title": "Asset Account Id"
          },
          "cost": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "What it cost, in the books' currency, already in the asset account.",
            "title": "Cost"
          },
          "department_value_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department its depreciation is expensed to, so the expense shows in that department's spend; none when left out.",
            "title": "Department Value Id"
          },
          "depreciation_expense_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where each month is expensed; 6290 Depreciation and amortization when left out.",
            "title": "Depreciation Expense Account Id"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "name": {
            "description": "What it is, e.g. `MacBook Pro, Ana`.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "placed_in_service_on": {
            "description": "The day it went into use.",
            "format": "date",
            "title": "Placed In Service On",
            "type": "string"
          },
          "salvage_value": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "description": "What it will be worth at the end; less than its cost.",
            "title": "Salvage Value"
          },
          "source_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction that bought it, already filed to the asset account. To file and register in one step, capitalize the transaction instead (`transactions.capitalize`).",
            "title": "Source Event Id"
          },
          "useful_life_months": {
            "description": "How many months it lasts: 36 for a laptop.",
            "maximum": 1200.0,
            "minimum": 1.0,
            "title": "Useful Life Months",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "placed_in_service_on",
          "cost",
          "useful_life_months"
        ],
        "title": "FixedAssetCreate",
        "type": "object"
      },
      "FixedAssetDetailOut": {
        "properties": {
          "accumulated_depreciation": {
            "description": "What the closes have depreciated so far.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Accumulated Depreciation",
            "type": "string"
          },
          "accumulated_depreciation_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where its depreciation builds up."
          },
          "asset_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where its cost sits, e.g. 1600 Computer equipment."
          },
          "book_value": {
            "description": "Cost less accumulated depreciation; zero once disposed of.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Book Value",
            "type": "string"
          },
          "cost": {
            "description": "What it cost, in the books' currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cost",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "department_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That department's name; null for none.",
            "title": "Department Name"
          },
          "department_value_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department its depreciation is expensed to; null for none.",
            "title": "Department Value Id"
          },
          "depreciates_through": {
            "description": "The last day of its last month of depreciation.",
            "format": "date",
            "title": "Depreciates Through",
            "type": "string"
          },
          "depreciation_expense_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where each month's depreciation is expensed."
          },
          "disposal_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry that took it off the books. Reversing it puts the asset back in service.",
            "title": "Disposal Entry Id"
          },
          "disposal_proceeds": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the disposal brought in.",
            "title": "Disposal Proceeds"
          },
          "disposed_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it was sold, scrapped or given away.",
            "title": "Disposed On"
          },
          "fully_depreciated": {
            "description": "Whether the closes have taken all of its cost less salvage into depreciation.",
            "title": "Fully Depreciated",
            "type": "boolean"
          },
          "gain_loss_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the gain or loss was posted to.",
            "title": "Gain Loss Account Id"
          },
          "gain_or_loss": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Proceeds less book value at disposal: positive is a gain, negative a loss.",
            "title": "Gain Or Loss"
          },
          "id": {
            "description": "An id that starts with `asset_`.",
            "examples": [
              "asset_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "asset"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "method": {
            "const": "straight_line",
            "description": "`straight_line`: the same share of cost less salvage every month.",
            "title": "Method",
            "type": "string"
          },
          "monthly_depreciation": {
            "description": "A full month's depreciation: cost less salvage over its useful life, rounded to the currency's minor unit. The months posted even out the rounding, so they add up to cost less salvage exactly.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Monthly Depreciation",
            "type": "string"
          },
          "months": {
            "description": "Every month it depreciates in, oldest first. A disposed asset's stop at the month before.",
            "items": {
              "$ref": "#/components/schemas/DepreciationMonthOut"
            },
            "title": "Months",
            "type": "array"
          },
          "name": {
            "description": "What it is, e.g. `MacBook Pro, Ana`.",
            "title": "Name",
            "type": "string"
          },
          "placed_in_service_on": {
            "description": "The day it went into use. Depreciation starts that month, a full month.",
            "format": "date",
            "title": "Placed In Service On",
            "type": "string"
          },
          "proceeds_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the proceeds went to, when there were any.",
            "title": "Proceeds Account Id"
          },
          "salvage_value": {
            "description": "What it will be worth at the end of its useful life.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Salvage Value",
            "type": "string"
          },
          "schedule_id": {
            "description": "Its depreciation schedule, which every close posts.",
            "examples": [
              "sched_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Schedule Id",
            "type": "string",
            "x-id-prefix": "sched"
          },
          "source_event_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That transaction's date; null without one.",
            "title": "Source Event Date"
          },
          "source_event_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That transaction's description, as the books name it; null without one.",
            "title": "Source Event Description"
          },
          "source_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction that bought it, when it was capitalized from one (`transactions.capitalize`); null when registered on its own.",
            "title": "Source Event Id"
          },
          "status": {
            "description": "`in_service` while it is on the books, `disposed` once sold or scrapped.",
            "enum": [
              "in_service",
              "disposed"
            ],
            "title": "Status",
            "type": "string"
          },
          "useful_life_months": {
            "description": "How many months it depreciates over.",
            "title": "Useful Life Months",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "fully_depreciated",
          "placed_in_service_on",
          "cost",
          "salvage_value",
          "currency",
          "method",
          "useful_life_months",
          "depreciates_through",
          "monthly_depreciation",
          "asset_account",
          "accumulated_depreciation_account",
          "depreciation_expense_account",
          "accumulated_depreciation",
          "book_value",
          "disposed_on",
          "disposal_proceeds",
          "proceeds_account_id",
          "gain_loss_account_id",
          "gain_or_loss",
          "disposal_entry_id",
          "schedule_id",
          "department_value_id",
          "department_name",
          "source_event_id",
          "source_event_description",
          "source_event_date",
          "memo",
          "created_at",
          "months"
        ],
        "title": "FixedAssetDetailOut",
        "type": "object"
      },
      "FixedAssetOut": {
        "properties": {
          "accumulated_depreciation": {
            "description": "What the closes have depreciated so far.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Accumulated Depreciation",
            "type": "string"
          },
          "accumulated_depreciation_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where its depreciation builds up."
          },
          "asset_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where its cost sits, e.g. 1600 Computer equipment."
          },
          "book_value": {
            "description": "Cost less accumulated depreciation; zero once disposed of.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Book Value",
            "type": "string"
          },
          "cost": {
            "description": "What it cost, in the books' currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cost",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "department_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That department's name; null for none.",
            "title": "Department Name"
          },
          "department_value_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department its depreciation is expensed to; null for none.",
            "title": "Department Value Id"
          },
          "depreciates_through": {
            "description": "The last day of its last month of depreciation.",
            "format": "date",
            "title": "Depreciates Through",
            "type": "string"
          },
          "depreciation_expense_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where each month's depreciation is expensed."
          },
          "disposal_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry that took it off the books. Reversing it puts the asset back in service.",
            "title": "Disposal Entry Id"
          },
          "disposal_proceeds": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the disposal brought in.",
            "title": "Disposal Proceeds"
          },
          "disposed_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it was sold, scrapped or given away.",
            "title": "Disposed On"
          },
          "fully_depreciated": {
            "description": "Whether the closes have taken all of its cost less salvage into depreciation.",
            "title": "Fully Depreciated",
            "type": "boolean"
          },
          "gain_loss_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the gain or loss was posted to.",
            "title": "Gain Loss Account Id"
          },
          "gain_or_loss": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Proceeds less book value at disposal: positive is a gain, negative a loss.",
            "title": "Gain Or Loss"
          },
          "id": {
            "description": "An id that starts with `asset_`.",
            "examples": [
              "asset_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "asset"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "method": {
            "const": "straight_line",
            "description": "`straight_line`: the same share of cost less salvage every month.",
            "title": "Method",
            "type": "string"
          },
          "monthly_depreciation": {
            "description": "A full month's depreciation: cost less salvage over its useful life, rounded to the currency's minor unit. The months posted even out the rounding, so they add up to cost less salvage exactly.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Monthly Depreciation",
            "type": "string"
          },
          "name": {
            "description": "What it is, e.g. `MacBook Pro, Ana`.",
            "title": "Name",
            "type": "string"
          },
          "placed_in_service_on": {
            "description": "The day it went into use. Depreciation starts that month, a full month.",
            "format": "date",
            "title": "Placed In Service On",
            "type": "string"
          },
          "proceeds_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the proceeds went to, when there were any.",
            "title": "Proceeds Account Id"
          },
          "salvage_value": {
            "description": "What it will be worth at the end of its useful life.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Salvage Value",
            "type": "string"
          },
          "schedule_id": {
            "description": "Its depreciation schedule, which every close posts.",
            "examples": [
              "sched_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Schedule Id",
            "type": "string",
            "x-id-prefix": "sched"
          },
          "source_event_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That transaction's date; null without one.",
            "title": "Source Event Date"
          },
          "source_event_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That transaction's description, as the books name it; null without one.",
            "title": "Source Event Description"
          },
          "source_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction that bought it, when it was capitalized from one (`transactions.capitalize`); null when registered on its own.",
            "title": "Source Event Id"
          },
          "status": {
            "description": "`in_service` while it is on the books, `disposed` once sold or scrapped.",
            "enum": [
              "in_service",
              "disposed"
            ],
            "title": "Status",
            "type": "string"
          },
          "useful_life_months": {
            "description": "How many months it depreciates over.",
            "title": "Useful Life Months",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "fully_depreciated",
          "placed_in_service_on",
          "cost",
          "salvage_value",
          "currency",
          "method",
          "useful_life_months",
          "depreciates_through",
          "monthly_depreciation",
          "asset_account",
          "accumulated_depreciation_account",
          "depreciation_expense_account",
          "accumulated_depreciation",
          "book_value",
          "disposed_on",
          "disposal_proceeds",
          "proceeds_account_id",
          "gain_loss_account_id",
          "gain_or_loss",
          "disposal_entry_id",
          "schedule_id",
          "department_value_id",
          "department_name",
          "source_event_id",
          "source_event_description",
          "source_event_date",
          "memo",
          "created_at"
        ],
        "title": "FixedAssetOut",
        "type": "object"
      },
      "FixedAssetPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FixedAssetOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "FixedAssetPage",
        "type": "object"
      },
      "ForeignIn": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "The amount in that currency, unsigned like `amount`.",
            "title": "Amount"
          },
          "currency": {
            "description": "The currency the line moved in, ISO 4217.",
            "maxLength": 3,
            "minLength": 3,
            "title": "Currency",
            "type": "string"
          },
          "rate": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "One unit of it in the books' currency, as booked.",
            "title": "Rate"
          }
        },
        "required": [
          "currency",
          "amount",
          "rate"
        ],
        "title": "ForeignIn",
        "type": "object"
      },
      "ForeignOut": {
        "properties": {
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "rate": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The rate it was booked at; null on a revaluation line.",
            "title": "Rate"
          }
        },
        "required": [
          "currency",
          "amount",
          "rate"
        ],
        "title": "ForeignOut",
        "type": "object"
      },
      "ForfeitureIn": {
        "properties": {
          "forfeited_on": {
            "description": "The holder's last day: what had not vested by then is forfeited.",
            "format": "date",
            "title": "Forfeited On",
            "type": "string"
          }
        },
        "required": [
          "forfeited_on"
        ],
        "title": "ForfeitureIn",
        "type": "object"
      },
      "Form1099YearOut": {
        "properties": {
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "threshold": {
            "description": "The year's filing threshold for a 1099-NEC or 1099-MISC.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Threshold",
            "type": "string"
          },
          "vendors": {
            "items": {
              "$ref": "#/components/schemas/VendorYearOut"
            },
            "title": "Vendors",
            "type": "array"
          },
          "year": {
            "title": "Year",
            "type": "integer"
          }
        },
        "required": [
          "year",
          "currency",
          "threshold",
          "vendors"
        ],
        "title": "Form1099YearOut",
        "type": "object"
      },
      "FreeLedgerLineList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FreeLedgerLineOut"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "FreeLedgerLineList",
        "type": "object"
      },
      "FreeLedgerLineOut": {
        "properties": {
          "amount": {
            "description": "As the statement prints it: money into the account positive, for a bank and a card alike.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "description": {
            "description": "The entry's description.",
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "entry_id": {
            "description": "The journal entry it is on.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "entry_no": {
            "title": "Entry No",
            "type": "integer"
          },
          "id": {
            "description": "The journal line's id: what a match made by hand names.",
            "examples": [
              "jel_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "jel"
          }
        },
        "required": [
          "id",
          "entry_id",
          "entry_no",
          "entry_date",
          "description",
          "amount"
        ],
        "title": "FreeLedgerLineOut",
        "type": "object"
      },
      "GlMappingOut": {
        "description": "Which GL account the account posted to over a span of dates.",
        "properties": {
          "account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Code"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Name"
          },
          "valid_from": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first day; null for the beginning of its history.",
            "title": "Valid From"
          },
          "valid_to": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day after the last; null while it still applies.",
            "title": "Valid To"
          }
        },
        "required": [
          "account_id",
          "account_code",
          "account_name",
          "valid_from",
          "valid_to"
        ],
        "title": "GlMappingOut",
        "type": "object"
      },
      "HolderRef": {
        "properties": {
          "id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "HolderRef",
        "type": "object"
      },
      "HomeOut": {
        "description": "The books' headline figures, at one posting sequence.",
        "properties": {
          "after_known_bills": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KnownOutflowsOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cash after the bills and payroll due in the next 90 days; null for books not set up yet."
          },
          "arr": {
            "description": "MRR \u00d7 12.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Arr",
            "type": "string"
          },
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "burning": {
            "description": "True when the net burn is above zero.",
            "title": "Burning",
            "type": "boolean"
          },
          "cash": {
            "description": "Cash across every cash account at the end of `as_of`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cash",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "gross_burn": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Operating cash that left in the last complete month, as a positive figure.",
            "title": "Gross Burn"
          },
          "mrr": {
            "description": "Subscription revenue recognized in `mrr_month`, read from the books (decision 0036).",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Mrr",
            "type": "string"
          },
          "mrr_month": {
            "description": "The complete month MRR is for: the first day of it.",
            "format": "date",
            "title": "Mrr Month",
            "type": "string"
          },
          "net_burn": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Average net burn of the last complete months (up to three); null with none yet.",
            "title": "Net Burn"
          },
          "runway_months": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months of cash at the net burn, to one decimal; null when not burning.",
            "title": "Runway Months"
          },
          "through_sequence": {
            "description": "Every figure counts the book's entries posted up to and including this sequence, and nothing after. Pass it back as `through_sequence` to read the same cut again.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "trailing_months": {
            "description": "How many complete months `net_burn` averages.",
            "title": "Trailing Months",
            "type": "integer"
          }
        },
        "required": [
          "through_sequence",
          "as_of",
          "currency",
          "cash",
          "gross_burn",
          "net_burn",
          "trailing_months",
          "burning",
          "runway_months",
          "mrr_month",
          "mrr",
          "arr"
        ],
        "title": "HomeOut",
        "type": "object"
      },
      "IncomeGroupOut": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/IncomeLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "code",
          "name",
          "lines",
          "total"
        ],
        "title": "IncomeGroupOut",
        "type": "object"
      },
      "IncomeLineOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "amount"
        ],
        "title": "IncomeLineOut",
        "type": "object"
      },
      "IncomeSectionOut": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/IncomeGroupOut"
            },
            "title": "Groups",
            "type": "array"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "key",
          "name",
          "groups",
          "total"
        ],
        "title": "IncomeSectionOut",
        "type": "object"
      },
      "IncomeStatementOut": {
        "properties": {
          "cost_of_revenue": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cost Of Revenue",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "gross_margin": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Margin"
          },
          "gross_profit": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Gross Profit",
            "type": "string"
          },
          "net_income": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Net Income",
            "type": "string"
          },
          "operating_expenses": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Operating Expenses",
            "type": "string"
          },
          "operating_income": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Operating Income",
            "type": "string"
          },
          "other_expense": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Other Expense",
            "type": "string"
          },
          "other_income": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Other Income",
            "type": "string"
          },
          "revenue": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "type": "string"
          },
          "sections": {
            "items": {
              "$ref": "#/components/schemas/IncomeSectionOut"
            },
            "title": "Sections",
            "type": "array"
          },
          "since": {
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "until": {
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "since",
          "until",
          "currency",
          "sections",
          "revenue",
          "cost_of_revenue",
          "gross_profit",
          "operating_expenses",
          "operating_income",
          "other_income",
          "other_expense",
          "net_income",
          "gross_margin"
        ],
        "title": "IncomeStatementOut",
        "type": "object"
      },
      "InstrumentAccrue": {
        "properties": {
          "through": {
            "description": "The last day to accrue interest through.",
            "format": "date",
            "title": "Through",
            "type": "string"
          }
        },
        "required": [
          "through"
        ],
        "title": "InstrumentAccrue",
        "type": "object"
      },
      "InstrumentConvert": {
        "properties": {
          "capitalization": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The company capitalization, in shares, the valuation cap divides by: post-money for a post-money SAFE, pre-money for a pre-money one. Needed when the SAFE has a cap.",
            "title": "Capitalization"
          },
          "converted_on": {
            "description": "The day the round closed.",
            "format": "date",
            "title": "Converted On",
            "type": "string"
          },
          "paid_in_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the rest goes; additional paid-in capital when left out.",
            "title": "Paid In Account Id"
          },
          "par_value": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "The par value of one share of the preferred stock it converts into.",
            "title": "Par Value"
          },
          "preferred_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the shares at par go; preferred stock when left out.",
            "title": "Preferred Account Id"
          },
          "price_per_share": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "The priced round's price per share.",
            "title": "Price Per Share"
          },
          "shares": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The shares the round's cap table issues, when it settled on a different count.",
            "title": "Shares"
          }
        },
        "required": [
          "price_per_share",
          "par_value",
          "converted_on"
        ],
        "title": "InstrumentConvert",
        "type": "object"
      },
      "InstrumentCreate": {
        "properties": {
          "account_id": {
            "description": "The account the money came in through, usually the bank account.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "classification_policy": {
            "default": "liability",
            "description": "`liability` (the default: carried in SAFE notes, convertible notes or venture debt) or `equity` (a SAFE only: carried in SAFEs classified as equity), as the company's accountant signs off.",
            "title": "Classification Policy",
            "type": "string"
          },
          "discount": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The discount as a fraction, if it has one: 0.20 is 20%.",
            "title": "Discount"
          },
          "instrument_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account it is carried in, when not its kind's or classification's own.",
            "title": "Instrument Account Id"
          },
          "interest_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The liability a note's or venture debt's interest accrues in; accrued interest when left out.",
            "title": "Interest Account Id"
          },
          "interest_expense_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expense it is charged to; interest expense when left out.",
            "title": "Interest Expense Account Id"
          },
          "interest_rate": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A convertible note's or venture debt's yearly interest rate as a fraction, simple and actual/365: 0.08 is 8%. Required for those, and left out for a SAFE.",
            "title": "Interest Rate"
          },
          "investor_party_id": {
            "description": "The investor: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Investor Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "issued_on": {
            "description": "The day the money arrived.",
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "kind": {
            "default": "safe_post",
            "description": "`safe_post` (a post-money SAFE), `safe_pre` (a pre-money SAFE), `convertible_note` or `venture_debt`.",
            "title": "Kind",
            "type": "string"
          },
          "maturity_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a note or venture debt falls due, if its terms say. Left out for a SAFE.",
            "title": "Maturity On"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "mfn": {
            "default": false,
            "description": "Whether it carries a most-favoured-nation clause.",
            "title": "Mfn",
            "type": "boolean"
          },
          "name": {
            "description": "How the books name it, e.g. `Seed SAFE, Acme Ventures`.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "principal": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "The purchase amount, in the books' currency.",
            "title": "Principal"
          },
          "valuation_cap": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The valuation cap, if it has one.",
            "title": "Valuation Cap"
          }
        },
        "required": [
          "investor_party_id",
          "name",
          "principal",
          "issued_on",
          "account_id"
        ],
        "title": "InstrumentCreate",
        "type": "object"
      },
      "InstrumentOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "accrued_interest": {
            "description": "Interest accrued and not yet paid or converted.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Accrued Interest",
            "type": "string"
          },
          "accrued_through": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last day interest has accrued through, if any has.",
            "title": "Accrued Through"
          },
          "classification_policy": {
            "title": "Classification Policy",
            "type": "string"
          },
          "converted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "discount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Id"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/EventOut"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "description": "An id that starts with `fin_`.",
            "examples": [
              "fin_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "fin"
          },
          "instrument_account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Instrument Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "interest_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where its interest accrues; null for a SAFE.",
            "title": "Interest Account Id"
          },
          "interest_expense_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "What its interest is charged to; null for a SAFE.",
            "title": "Interest Expense Account Id"
          },
          "interest_rate": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A note's or venture debt's yearly rate as a fraction; null for a SAFE.",
            "title": "Interest Rate"
          },
          "investor_party_id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Investor Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "issued_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "linked_transaction_ids": {
            "description": "The bank transactions this command linked as its cash (decision 0191), when it records cash; empty otherwise and when read back.",
            "items": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "txn"
            },
            "title": "Linked Transaction Ids",
            "type": "array"
          },
          "maturity_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maturity On"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "mfn": {
            "title": "Mfn",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "outstanding_principal": {
            "description": "The principal still owed: all of it until it is repaid or converts, zero for a draft.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Outstanding Principal",
            "type": "string"
          },
          "principal": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Principal",
            "type": "string"
          },
          "repaid_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repaid At"
          },
          "reversed_transaction_ids": {
            "description": "Of those, the ones that were in the books (filed by the model or from suspense) and were reversed first, so their cash counts once.",
            "items": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "txn"
            },
            "title": "Reversed Transaction Ids",
            "type": "array"
          },
          "row_version": {
            "title": "Row Version",
            "type": "integer"
          },
          "source_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The system it was imported from (e.g. `clerky`), or null for one written in LedgerIt. Read-only: set when it is imported and never changed.",
            "title": "Source Provider"
          },
          "source_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That system's id for it, or null. Read-only; one instrument per source id per set of books.",
            "title": "Source Ref"
          },
          "status": {
            "description": "`draft`, `outstanding`, `converted`, `repaid` or `void`.",
            "title": "Status",
            "type": "string"
          },
          "valuation_cap": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valuation Cap"
          },
          "void_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Void Entry Id"
          },
          "voided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voided At"
          }
        },
        "required": [
          "id",
          "kind",
          "investor_party_id",
          "name",
          "principal",
          "currency",
          "valuation_cap",
          "discount",
          "mfn",
          "interest_rate",
          "maturity_on",
          "classification_policy",
          "issued_on",
          "account_id",
          "instrument_account_id",
          "interest_account_id",
          "interest_expense_account_id",
          "status",
          "outstanding_principal",
          "accrued_interest",
          "accrued_through",
          "memo",
          "source_provider",
          "source_ref",
          "entry_id",
          "void_entry_id",
          "issued_at",
          "converted_at",
          "voided_at",
          "repaid_at",
          "created_at",
          "row_version",
          "events"
        ],
        "title": "InstrumentOut",
        "type": "object"
      },
      "InstrumentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/InstrumentOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "InstrumentPage",
        "type": "object"
      },
      "InstrumentRepay": {
        "properties": {
          "account_id": {
            "description": "The account the money left through, usually the bank account.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "interest": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "description": "How much of it is accrued interest.",
            "title": "Interest"
          },
          "paid_on": {
            "description": "The day the money left. Interest accrues through it first.",
            "format": "date",
            "title": "Paid On",
            "type": "string"
          },
          "principal": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "description": "How much of the payment is principal.",
            "title": "Principal"
          }
        },
        "required": [
          "paid_on",
          "account_id"
        ],
        "title": "InstrumentRepay",
        "type": "object"
      },
      "InstrumentUpdate": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "classification_policy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Classification Policy"
          },
          "discount": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "instrument_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Account Id"
          },
          "interest_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The liability a note's or venture debt's interest accrues in; accrued interest when left out.",
            "title": "Interest Account Id"
          },
          "interest_expense_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expense it is charged to; interest expense when left out.",
            "title": "Interest Expense Account Id"
          },
          "interest_rate": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A convertible note's or venture debt's yearly interest rate as a fraction, simple and actual/365: 0.08 is 8%. Required for those, and left out for a SAFE.",
            "title": "Interest Rate"
          },
          "investor_party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Investor Party Id"
          },
          "issued_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued On"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "maturity_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a note or venture debt falls due, if its terms say. Left out for a SAFE.",
            "title": "Maturity On"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "mfn": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mfn"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "principal": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal"
          },
          "valuation_cap": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valuation Cap"
          }
        },
        "title": "InstrumentUpdate",
        "type": "object"
      },
      "InstrumentVoid": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "title": "InstrumentVoid",
        "type": "object"
      },
      "IntercompanyReversal": {
        "properties": {
          "entry_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Defaults to the transaction's date. Give a day in an open month when that one is closed in either set of books.",
            "title": "Entry Date"
          },
          "reason": {
            "description": "Why, on both reversing entries.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "IntercompanyReversal",
        "type": "object"
      },
      "IntercompanySideOut": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "The other account of that side's entry."
          },
          "amount": {
            "description": "The amount in that side's currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "due_account": {
            "$ref": "#/components/schemas/AccountRef",
            "description": "Where that side carries the balance: the due-from on the side that is owed, the due-to on the side that owes."
          },
          "entity": {
            "$ref": "#/components/schemas/EntityRef",
            "description": "The set of books."
          },
          "entry_id": {
            "description": "That side's entry.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "reversal_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry that reversed it, once reversed.",
            "title": "Reversal Entry Id"
          }
        },
        "required": [
          "entity",
          "amount",
          "currency",
          "due_account",
          "account",
          "entry_id",
          "reversal_entry_id"
        ],
        "title": "IntercompanySideOut",
        "type": "object"
      },
      "IntercompanyTransactionCreate": {
        "properties": {
          "account_id": {
            "description": "The other side of these books' entry: the bank account the money left from, or the revenue account of a recharge.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "What they owe, in these books' currency.",
            "title": "Amount"
          },
          "counterparty_account_id": {
            "description": "The other side of their entry: the bank account the money arrived in, or the expense account of a recharge.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "counterparty_amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The amount in their currency. Needed only when their books keep another currency.",
            "title": "Counterparty Amount"
          },
          "counterparty_entity_id": {
            "description": "The other books, of the same organization, that owe these books. You need to be able to post in them too.",
            "examples": [
              "ent_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Entity Id",
            "type": "string",
            "x-id-prefix": "ent"
          },
          "description": {
            "description": "What it is for, on both entries.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "due_from_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "An asset account of these books; 1700 Due from related entities when left out.",
            "title": "Due From Account Id"
          },
          "due_to_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "A liability account of theirs; 2900 Due to related entities when left out.",
            "title": "Due To Account Id"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "transaction_date": {
            "description": "The day both entries are dated.",
            "format": "date",
            "title": "Transaction Date",
            "type": "string"
          }
        },
        "required": [
          "counterparty_entity_id",
          "transaction_date",
          "description",
          "amount",
          "account_id",
          "counterparty_account_id"
        ],
        "title": "IntercompanyTransactionCreate",
        "type": "object"
      },
      "IntercompanyTransactionOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "due_from": {
            "$ref": "#/components/schemas/IntercompanySideOut",
            "description": "The books that are owed."
          },
          "due_to": {
            "$ref": "#/components/schemas/IntercompanySideOut",
            "description": "The books that owe."
          },
          "id": {
            "description": "An id that starts with `ic_`.",
            "examples": [
              "ic_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "ic"
          },
          "linked_transaction_ids": {
            "description": "The bank transactions in these books this command linked as its cash (decision 0191), when it records cash; empty otherwise and when read back.",
            "items": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "txn"
            },
            "title": "Linked Transaction Ids",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "reversed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reversed At"
          },
          "reversed_transaction_ids": {
            "description": "Of those, the ones that were in the books (filed by the model or from suspense) and were reversed first, so their cash counts once.",
            "items": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "txn"
            },
            "title": "Reversed Transaction Ids",
            "type": "array"
          },
          "side": {
            "description": "Which side these books are: `due_from` when the other books owe them, `due_to` when they owe.",
            "enum": [
              "due_from",
              "due_to"
            ],
            "title": "Side",
            "type": "string"
          },
          "status": {
            "description": "`posted`, or `reversed` once both entries were reversed.",
            "enum": [
              "posted",
              "reversed"
            ],
            "title": "Status",
            "type": "string"
          },
          "transaction_date": {
            "format": "date",
            "title": "Transaction Date",
            "type": "string"
          }
        },
        "required": [
          "id",
          "side",
          "transaction_date",
          "description",
          "status",
          "due_from",
          "due_to",
          "memo",
          "reversed_at",
          "created_at"
        ],
        "title": "IntercompanyTransactionOut",
        "type": "object"
      },
      "IntercompanyTransactionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/IntercompanyTransactionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "IntercompanyTransactionPage",
        "type": "object"
      },
      "InvestorShareCreate": {
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the link stops working. Left out, it works until it is revoked.",
            "title": "Expires At"
          },
          "investor_email": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 3,
                "pattern": "^[^@\\s]+@[^@\\s]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their address, for the founder's own record. LedgerIt sends nothing to it.",
            "title": "Investor Email"
          },
          "investor_firm": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their firm or fund.",
            "title": "Investor Firm"
          },
          "investor_name": {
            "description": "Who the link is for, as the founder knows them.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Investor Name",
            "type": "string"
          },
          "scope": {
            "description": "What the link shows: `board_packs`, `statements`, or both (the default).",
            "items": {
              "enum": [
                "board_packs",
                "statements"
              ],
              "type": "string"
            },
            "maxItems": 2,
            "minItems": 1,
            "title": "Scope",
            "type": "array"
          }
        },
        "required": [
          "investor_name"
        ],
        "title": "InvestorShareCreate",
        "type": "object"
      },
      "InvestorShareCreatedOut": {
        "description": "A link just made, with the one copy of its token there will be.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who made it; null once they have left.",
            "title": "Created By"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it stops working; null for a link with no expiry.",
            "title": "Expires At"
          },
          "id": {
            "description": "The link's id. Its token is never shown again after it is made.",
            "examples": [
              "investor_share_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "investor_share"
          },
          "investor_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their address, when one was given. Nothing is sent to it.",
            "title": "Investor Email"
          },
          "investor_firm": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their firm or fund, when one was given.",
            "title": "Investor Firm"
          },
          "investor_name": {
            "description": "Who the link is for.",
            "title": "Investor Name",
            "type": "string"
          },
          "last_viewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the investor last opened it; null if never.",
            "title": "Last Viewed At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was revoked.",
            "title": "Revoked At"
          },
          "revoked_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who revoked it; null once they have left, or if it is not revoked.",
            "title": "Revoked By"
          },
          "scope": {
            "description": "What the link shows of each closed month: `board_packs` (the pack's figures and commentary), `statements` (the balance sheet, income statement and cash flow statement), or both. Never transactions, payroll or an open month.",
            "items": {
              "enum": [
                "board_packs",
                "statements"
              ],
              "type": "string"
            },
            "title": "Scope",
            "type": "array"
          },
          "status": {
            "description": "`live` while it opens the page, `expired` once its expiry has passed, `revoked` once revoked.",
            "enum": [
              "live",
              "expired",
              "revoked"
            ],
            "title": "Status",
            "type": "string"
          },
          "token": {
            "description": "The link's secret. Shown once: LedgerIt keeps only its SHA-256, so it cannot be shown again. A retry of the same request with the same Idempotency-Key within a day returns it again.",
            "title": "Token",
            "type": "string"
          },
          "url": {
            "description": "The investor's page: send them this.",
            "title": "Url",
            "type": "string"
          },
          "view_count": {
            "description": "How many times it was opened.",
            "title": "View Count",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "investor_name",
          "investor_email",
          "investor_firm",
          "scope",
          "status",
          "expires_at",
          "revoked_at",
          "revoked_by",
          "created_by",
          "created_at",
          "last_viewed_at",
          "view_count",
          "token",
          "url"
        ],
        "title": "InvestorShareCreatedOut",
        "type": "object"
      },
      "InvestorShareOut": {
        "description": "A link that shares these books' closed months with one investor.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who made it; null once they have left.",
            "title": "Created By"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it stops working; null for a link with no expiry.",
            "title": "Expires At"
          },
          "id": {
            "description": "The link's id. Its token is never shown again after it is made.",
            "examples": [
              "investor_share_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "investor_share"
          },
          "investor_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their address, when one was given. Nothing is sent to it.",
            "title": "Investor Email"
          },
          "investor_firm": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their firm or fund, when one was given.",
            "title": "Investor Firm"
          },
          "investor_name": {
            "description": "Who the link is for.",
            "title": "Investor Name",
            "type": "string"
          },
          "last_viewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the investor last opened it; null if never.",
            "title": "Last Viewed At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was revoked.",
            "title": "Revoked At"
          },
          "revoked_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who revoked it; null once they have left, or if it is not revoked.",
            "title": "Revoked By"
          },
          "scope": {
            "description": "What the link shows of each closed month: `board_packs` (the pack's figures and commentary), `statements` (the balance sheet, income statement and cash flow statement), or both. Never transactions, payroll or an open month.",
            "items": {
              "enum": [
                "board_packs",
                "statements"
              ],
              "type": "string"
            },
            "title": "Scope",
            "type": "array"
          },
          "status": {
            "description": "`live` while it opens the page, `expired` once its expiry has passed, `revoked` once revoked.",
            "enum": [
              "live",
              "expired",
              "revoked"
            ],
            "title": "Status",
            "type": "string"
          },
          "view_count": {
            "description": "How many times it was opened.",
            "title": "View Count",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "investor_name",
          "investor_email",
          "investor_firm",
          "scope",
          "status",
          "expires_at",
          "revoked_at",
          "revoked_by",
          "created_by",
          "created_at",
          "last_viewed_at",
          "view_count"
        ],
        "title": "InvestorShareOut",
        "type": "object"
      },
      "InvestorSharePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/InvestorShareOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "InvestorSharePage",
        "type": "object"
      },
      "InvoiceCreate": {
        "properties": {
          "due_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it falls due; the customer's payment terms from the issue day (30 days without) when left out.",
            "title": "Due Date"
          },
          "issue_date": {
            "format": "date",
            "title": "Issue Date",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/InvoiceLineIn"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unique in these books; the next INV-0001-style number when left out.",
            "title": "Number"
          },
          "party_id": {
            "description": "The customer: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "payment_link": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the customer can pay it, as you give it. To have LedgerIt make one in your Stripe account once it is issued, use `POST /v1/invoices/{invoice_id}/payment_link`.",
            "title": "Payment Link"
          },
          "send_reminders": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Email the customer reminders a few days before it is due and after it falls overdue; off when left out.",
            "title": "Send Reminders"
          }
        },
        "required": [
          "party_id",
          "issue_date",
          "lines"
        ],
        "title": "InvoiceCreate",
        "type": "object"
      },
      "InvoiceLineIn": {
        "properties": {
          "account_id": {
            "description": "The income (or deferred revenue) account it is earned in.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "description": {
            "description": "What is billed, as the customer reads it.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "quantity": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "1",
            "title": "Quantity"
          },
          "service_end": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last day of the service it bills, if any.",
            "title": "Service End"
          },
          "service_start": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first day of the service it bills, if any.",
            "title": "Service Start"
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "description": "Sales tax on the line; must be 0 until tax is supported.",
            "title": "Tax Amount"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "Per unit; negative for a discount line.",
            "title": "Unit Price"
          }
        },
        "required": [
          "description",
          "unit_price",
          "account_id"
        ],
        "title": "InvoiceLineIn",
        "type": "object"
      },
      "InvoiceLineOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "line_no": {
            "title": "Line No",
            "type": "integer"
          },
          "quantity": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Quantity",
            "type": "string"
          },
          "service_end": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service End"
          },
          "service_start": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Start"
          },
          "tax_amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Tax Amount",
            "type": "string"
          },
          "unit_price": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unit Price",
            "type": "string"
          }
        },
        "required": [
          "line_no",
          "description",
          "quantity",
          "unit_price",
          "amount",
          "account_id",
          "tax_amount",
          "service_start",
          "service_end"
        ],
        "title": "InvoiceLineOut",
        "type": "object"
      },
      "InvoiceOut": {
        "properties": {
          "amount_due": {
            "description": "What the customer still owes on it today; 0 for a draft or a void invoice.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount Due",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer's name as the invoice was issued to them.",
            "title": "Customer Name"
          },
          "due_date": {
            "format": "date",
            "title": "Due Date",
            "type": "string"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry that put it on the books, once issued.",
            "title": "Entry Id"
          },
          "id": {
            "description": "An id that starts with `inv_`.",
            "examples": [
              "inv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "inv"
          },
          "issue_date": {
            "format": "date",
            "title": "Issue Date",
            "type": "string"
          },
          "issued_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/InvoiceLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "title": "Number",
            "type": "string"
          },
          "party_id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "payment_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the customer can pay it.",
            "title": "Payment Link"
          },
          "payment_link_made": {
            "description": "The link was made by LedgerIt in the books' Stripe account, and a payment through it is recorded and applied to this invoice at the next Stripe sync.",
            "title": "Payment Link Made",
            "type": "boolean"
          },
          "reminders": {
            "description": "The reminders the customer was sent, the earliest first.",
            "items": {
              "$ref": "#/components/schemas/InvoiceReminderOut"
            },
            "title": "Reminders",
            "type": "array"
          },
          "row_version": {
            "title": "Row Version",
            "type": "integer"
          },
          "send_reminders": {
            "description": "Whether the customer is emailed reminders of what is owed.",
            "title": "Send Reminders",
            "type": "boolean"
          },
          "source": {
            "description": "Where it was written: `ledgerit`, `stripe` or `migration`.",
            "title": "Source",
            "type": "string"
          },
          "status": {
            "description": "`draft`, `issued` or `void`.",
            "title": "Status",
            "type": "string"
          },
          "subtotal": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Subtotal",
            "type": "string"
          },
          "tax_total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Tax Total",
            "type": "string"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "void_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The reversal that took it off, once void.",
            "title": "Void Entry Id"
          },
          "voided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voided At"
          }
        },
        "required": [
          "id",
          "number",
          "party_id",
          "issue_date",
          "due_date",
          "currency",
          "subtotal",
          "tax_total",
          "total",
          "status",
          "amount_due",
          "customer_name",
          "payment_link",
          "payment_link_made",
          "send_reminders",
          "reminders",
          "source",
          "memo",
          "entry_id",
          "void_entry_id",
          "issued_at",
          "voided_at",
          "created_at",
          "row_version",
          "lines"
        ],
        "title": "InvoiceOut",
        "type": "object"
      },
      "InvoicePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/InvoiceOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "InvoicePage",
        "type": "object"
      },
      "InvoiceReminderOut": {
        "properties": {
          "days_from_due": {
            "description": "The stage it was sent for: days from the due day, negative before it.",
            "title": "Days From Due",
            "type": "integer"
          },
          "sent_on": {
            "format": "date",
            "title": "Sent On",
            "type": "string"
          },
          "sent_to": {
            "description": "The email address it went to.",
            "title": "Sent To",
            "type": "string"
          }
        },
        "required": [
          "days_from_due",
          "sent_to",
          "sent_on"
        ],
        "title": "InvoiceReminderOut",
        "type": "object"
      },
      "InvoiceReminders": {
        "properties": {
          "enabled": {
            "description": "Whether the customer is emailed reminders of what is owed.",
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "title": "InvoiceReminders",
        "type": "object"
      },
      "InvoiceUpdate": {
        "properties": {
          "due_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          },
          "issue_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issue Date"
          },
          "lines": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/InvoiceLineIn"
                },
                "maxItems": 500,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Replaces every line when given.",
            "title": "Lines"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Number"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Id"
          },
          "payment_link": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Link"
          },
          "send_reminders": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send Reminders"
          }
        },
        "title": "InvoiceUpdate",
        "type": "object"
      },
      "InvoiceVoid": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it is voided; written on the reversal.",
            "title": "Reason"
          }
        },
        "title": "InvoiceVoid",
        "type": "object"
      },
      "KindPreferenceIn": {
        "properties": {
          "channels": {
            "description": "Where it should reach the caller in these books from now on. Empty turns it off. `slack` is kept even while the books have no Slack workspace connected, and `whatsapp` while the caller has no number linked; notices wait for one rather than going there. `whatsapp` for a kind that cannot go there is left out.",
            "items": {
              "enum": [
                "in_app",
                "email",
                "slack",
                "whatsapp"
              ],
              "type": "string"
            },
            "maxItems": 4,
            "title": "Channels",
            "type": "array"
          },
          "key": {
            "description": "A kind of notification: a notification's `type`.",
            "enum": [
              "connection_failing",
              "transactions_need_review",
              "receipt_missing",
              "period_closed",
              "period_reopened",
              "member_joined",
              "mentioned",
              "question_asked",
              "question_answered",
              "filing_proposed",
              "weekly_digest"
            ],
            "title": "Key",
            "type": "string"
          }
        },
        "required": [
          "key",
          "channels"
        ],
        "title": "KindPreferenceIn",
        "type": "object"
      },
      "KindPreferenceOut": {
        "properties": {
          "category": {
            "description": "The category Settings shows it under.",
            "enum": [
              "connections",
              "review",
              "receipts",
              "close",
              "team",
              "discussion",
              "digest"
            ],
            "title": "Category",
            "type": "string"
          },
          "channels": {
            "description": "Where it reaches the caller in these books. Empty when it is turned off.",
            "items": {
              "enum": [
                "in_app",
                "email",
                "slack",
                "whatsapp"
              ],
              "type": "string"
            },
            "title": "Channels",
            "type": "array"
          },
          "channels_available": {
            "description": "The channels this kind can reach the caller on in these books: those of the preferences' `channels_available` it can go to. `whatsapp` only for a kind LedgerIt has an approved WhatsApp message for, such as a missing receipt.",
            "items": {
              "enum": [
                "in_app",
                "email",
                "slack",
                "whatsapp"
              ],
              "type": "string"
            },
            "title": "Channels Available",
            "type": "array"
          },
          "key": {
            "description": "A kind of notification: a notification's `type`.",
            "enum": [
              "connection_failing",
              "transactions_need_review",
              "receipt_missing",
              "period_closed",
              "period_reopened",
              "member_joined",
              "mentioned",
              "question_asked",
              "question_answered",
              "filing_proposed",
              "weekly_digest"
            ],
            "title": "Key",
            "type": "string"
          }
        },
        "required": [
          "key",
          "category",
          "channels",
          "channels_available"
        ],
        "title": "KindPreferenceOut",
        "type": "object"
      },
      "KnownOutflowsOut": {
        "description": "Cash less what the books know is due soon (decision 0167).",
        "properties": {
          "bills": {
            "description": "What is due by `through` on the bills in and the bills vendors' rhythms say are coming, late ones included: the total of `GET /v1/reports/upcoming_bills` over the same days.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Bills",
            "type": "string"
          },
          "cash_after": {
            "description": "`cash` less `bills` and `payroll`. The cash is the cut's, at `through_sequence`; the bills and payroll are the books' as they stand when read, so this one figure is not pinned to the sequence.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cash After",
            "type": "string"
          },
          "payroll": {
            "description": "The payroll runs expected by `through`, each payroll provider's at the rhythm of its last two runs and at what its last run took out of cash. A provider with no run in 60 days is left out.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Payroll",
            "type": "string"
          },
          "payroll_estimated": {
            "description": "True when `payroll` is projected from the last run rather than runs a provider has scheduled: always, when there is any.",
            "title": "Payroll Estimated",
            "type": "boolean"
          },
          "through": {
            "description": "The last day counted: 90 days from `as_of`, `as_of` included.",
            "format": "date",
            "title": "Through",
            "type": "string"
          }
        },
        "required": [
          "through",
          "bills",
          "payroll",
          "payroll_estimated",
          "cash_after"
        ],
        "title": "KnownOutflowsOut",
        "type": "object"
      },
      "LineDimensionIn": {
        "properties": {
          "dimension_id": {
            "description": "An id that starts with `dim_`.",
            "examples": [
              "dim_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Dimension Id",
            "type": "string",
            "x-id-prefix": "dim"
          },
          "value_id": {
            "description": "A value of that dimension.",
            "examples": [
              "dimv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Value Id",
            "type": "string",
            "x-id-prefix": "dimv"
          }
        },
        "required": [
          "dimension_id",
          "value_id"
        ],
        "title": "LineDimensionIn",
        "type": "object"
      },
      "LineDimensionOut": {
        "properties": {
          "dimension_id": {
            "description": "An id that starts with `dim_`.",
            "examples": [
              "dim_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Dimension Id",
            "type": "string",
            "x-id-prefix": "dim"
          },
          "dimension_key": {
            "description": "The dimension's key, e.g. `department`.",
            "title": "Dimension Key",
            "type": "string"
          },
          "dimension_name": {
            "title": "Dimension Name",
            "type": "string"
          },
          "value_code": {
            "title": "Value Code",
            "type": "string"
          },
          "value_id": {
            "description": "An id that starts with `dimv_`.",
            "examples": [
              "dimv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Value Id",
            "type": "string",
            "x-id-prefix": "dimv"
          },
          "value_name": {
            "title": "Value Name",
            "type": "string"
          }
        },
        "required": [
          "dimension_id",
          "dimension_key",
          "dimension_name",
          "value_id",
          "value_code",
          "value_name"
        ],
        "title": "LineDimensionOut",
        "type": "object"
      },
      "LineOut": {
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "dimensions": {
            "description": "The line's value for each dimension it names, by key.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "foreign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForeignOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the line moved in, when not the books' own currency."
          },
          "id": {
            "description": "An id that starts with `jel_`.",
            "examples": [
              "jel_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "jel"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the line is with: a counterparty of these books.",
            "title": "Party Id"
          },
          "party_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The party's logo, square PNG; null for none.",
            "title": "Party Logo Url"
          },
          "party_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The party's name.",
            "title": "Party Name"
          }
        },
        "required": [
          "id",
          "account_id",
          "account_code",
          "account_name",
          "direction",
          "amount",
          "memo"
        ],
        "title": "LineOut",
        "type": "object"
      },
      "LinkCash": {
        "properties": {
          "counterparty_entity_id": {
            "anyOf": [
              {
                "description": "An id that starts with `ent_`.",
                "examples": [
                  "ent_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "ent"
              },
              {
                "type": "null"
              }
            ],
            "description": "Another company of the organization to record it as intercompany with (`new_intercompany`): a deposit is what these books owe it, a payment what it owes these.",
            "title": "Counterparty Entity Id"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "A financing instrument's or intercompany transaction's entry that already holds its cash (`transactions.list_capital_options`, `financing` and `intercompany`).",
            "title": "Entry Id"
          },
          "financing_instrument_id": {
            "anyOf": [
              {
                "description": "An id that starts with `fin_`.",
                "examples": [
                  "fin_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "fin"
              },
              {
                "type": "null"
              }
            ],
            "description": "A draft instrument to issue from it (`financing_draft`).",
            "title": "Financing Instrument Id"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why, kept in the audit trail.",
            "title": "Note"
          }
        },
        "title": "LinkCash",
        "type": "object"
      },
      "LinkIn": {
        "properties": {
          "event_id": {
            "description": "The transaction the document is evidence for.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Event Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "event_id"
        ],
        "title": "LinkIn",
        "type": "object"
      },
      "MailProvider": {
        "description": "A mailbox provider (`app/integrations/mail/__init__.py`).",
        "enum": [
          "gmail",
          "outlook"
        ],
        "title": "MailProvider",
        "type": "string"
      },
      "MailboxMessageOut": {
        "description": "One message a mailbox search opened, and what became of it.",
        "properties": {
          "connection_id": {
            "description": "The mailbox it is in.",
            "examples": [
              "conn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Connection Id",
            "type": "string",
            "x-id-prefix": "conn"
          },
          "document_id": {
            "anyOf": [
              {
                "description": "An id that starts with `doc_`.",
                "examples": [
                  "doc_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "doc"
              },
              {
                "type": "null"
              }
            ],
            "description": "The receipt it became, while it exists.",
            "title": "Document Id"
          },
          "id": {
            "description": "An id that starts with `mail_msg_`.",
            "examples": [
              "mail_msg_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "mail_msg"
          },
          "opened_at": {
            "description": "When the search opened it.",
            "format": "date-time",
            "title": "Opened At",
            "type": "string"
          },
          "received_at": {
            "description": "When it arrived in the mailbox.",
            "format": "date-time",
            "title": "Received At",
            "type": "string"
          },
          "sender": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who sent it.",
            "title": "Sender"
          },
          "status": {
            "description": "`kept`: it is a receipt, and `document_id` is the document it became. `not_a_receipt`: read and set aside; nothing of its body is kept.",
            "title": "Status",
            "type": "string"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The charge it was searched for, or, when kept, the charge it is the receipt of.",
            "title": "Transaction Id"
          }
        },
        "required": [
          "id",
          "connection_id",
          "transaction_id",
          "status",
          "document_id",
          "sender",
          "subject",
          "received_at",
          "opened_at"
        ],
        "title": "MailboxMessageOut",
        "type": "object"
      },
      "MailboxMessagePage": {
        "description": "A page of the messages mailbox searches opened, newest first.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/MailboxMessageOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "MailboxMessagePage",
        "type": "object"
      },
      "MailboxSearchOut": {
        "properties": {
          "started": {
            "description": "Whether a search was started now. False without background work in this deployment: the six-hourly search runs it instead.",
            "title": "Started",
            "type": "boolean"
          }
        },
        "required": [
          "started"
        ],
        "title": "MailboxSearchOut",
        "type": "object"
      },
      "MailboxSearchStateOut": {
        "properties": {
          "last_searched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the last search ended, successfully or not; null before the first. Each search is kept among the connection's runs, with what it found.",
            "title": "Last Searched At"
          },
          "running": {
            "description": "Whether a search of this mailbox is under way now.",
            "title": "Running",
            "type": "boolean"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the search under way began; null when none is.",
            "title": "Started At"
          }
        },
        "required": [
          "running",
          "started_at",
          "last_searched_at"
        ],
        "title": "MailboxSearchStateOut",
        "type": "object"
      },
      "MarkReadIn": {
        "properties": {
          "all": {
            "default": false,
            "description": "Mark every one of the caller's notifications read.",
            "title": "All",
            "type": "boolean"
          },
          "notification_ids": {
            "anyOf": [
              {
                "items": {
                  "description": "An id that starts with `ntf_`.",
                  "examples": [
                    "ntf_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "ntf"
                },
                "maxItems": 200,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The notifications to mark read. Ids that are not the caller's are ignored.",
            "title": "Notification Ids"
          }
        },
        "title": "MarkReadIn",
        "type": "object"
      },
      "MarkReadOut": {
        "properties": {
          "marked": {
            "description": "How many changed from unread to read.",
            "title": "Marked",
            "type": "integer"
          },
          "unread_count": {
            "description": "How many are unread now.",
            "title": "Unread Count",
            "type": "integer"
          }
        },
        "required": [
          "marked",
          "unread_count"
        ],
        "title": "MarkReadOut",
        "type": "object"
      },
      "Match": {
        "properties": {
          "other_event_id": {
            "description": "The other half: a transaction from `transactions.list_match_candidates`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Other Event Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "other_event_id"
        ],
        "title": "Match",
        "type": "object"
      },
      "MatchCandidatesOut": {
        "properties": {
          "data": {
            "description": "The transactions this one could be paired with as the other half of a transfer, nearest in date first. Empty when it cannot be paired.",
            "items": {
              "$ref": "#/components/schemas/TransactionOut"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "MatchCandidatesOut",
        "type": "object"
      },
      "MatchItemOut": {
        "properties": {
          "amount": {
            "description": "As the statement prints it: money into the account positive, for a bank and a card alike.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "journal_line_id": {
            "anyOf": [
              {
                "description": "An id that starts with `jel_`.",
                "examples": [
                  "jel_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "jel"
              },
              {
                "type": "null"
              }
            ],
            "title": "Journal Line Id"
          },
          "side": {
            "description": "`statement` or `ledger`.",
            "title": "Side",
            "type": "string"
          },
          "statement_line_id": {
            "anyOf": [
              {
                "description": "An id that starts with `stl_`.",
                "examples": [
                  "stl_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "stl"
              },
              {
                "type": "null"
              }
            ],
            "title": "Statement Line Id"
          }
        },
        "required": [
          "side",
          "statement_line_id",
          "journal_line_id",
          "amount"
        ],
        "title": "MatchItemOut",
        "type": "object"
      },
      "MatchRunOut": {
        "properties": {
          "amount": {
            "description": "Lines matched one for one by amount, days apart.",
            "title": "Amount",
            "type": "integer"
          },
          "batched": {
            "description": "Groups of statement lines matched to one ledger line.",
            "title": "Batched",
            "type": "integer"
          },
          "feed": {
            "description": "Lines matched through the transaction they were imported as.",
            "title": "Feed",
            "type": "integer"
          },
          "reconciled": {
            "description": "Every line is matched.",
            "title": "Reconciled",
            "type": "boolean"
          },
          "split": {
            "description": "Statement lines matched to several ledger lines.",
            "title": "Split",
            "type": "integer"
          },
          "unmatched_lines": {
            "description": "Lines still waiting for a person.",
            "title": "Unmatched Lines",
            "type": "integer"
          }
        },
        "required": [
          "feed",
          "amount",
          "batched",
          "split",
          "unmatched_lines",
          "reconciled"
        ],
        "title": "MatchRunOut",
        "type": "object"
      },
      "MergeCounterparty": {
        "properties": {
          "into_id": {
            "description": "The counterparty to merge this one into. It is the one kept.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Into Id",
            "type": "string",
            "x-id-prefix": "party"
          }
        },
        "required": [
          "into_id"
        ],
        "title": "MergeCounterparty",
        "type": "object"
      },
      "MessageStatus": {
        "description": "What became of a message (`app/integrations/mail/models.py`).",
        "enum": [
          "kept",
          "not_a_receipt"
        ],
        "title": "MessageStatus",
        "type": "string"
      },
      "MigrationControlTotalOut": {
        "properties": {
          "control": {
            "description": "`trial_balance`, `cash_by_account`, or `ar_aging` / `ap_aging` when the source gives its open items.",
            "title": "Control",
            "type": "string"
          },
          "difference": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "explained_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explained At"
          },
          "explained_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who gave the reason; null when the run did.",
            "title": "Explained By"
          },
          "explanation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the two differ, when they do.",
            "title": "Explanation"
          },
          "id": {
            "description": "An id that starts with `mig_total_`.",
            "examples": [
              "mig_total_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "mig_total"
          },
          "imported_total": {
            "description": "What these books say on the cutover day.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Imported Total",
            "type": "string"
          },
          "source_total": {
            "description": "What the old books say: positive on the debit side, or for an aging total, positive for what is owed.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Source Total",
            "type": "string"
          },
          "subject": {
            "description": "The account's code in these books; for an aging total, a receivable's or payable's code (the account as a whole) or a counterparty's slug (one party).",
            "title": "Subject",
            "type": "string"
          },
          "subject_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Name"
          }
        },
        "required": [
          "id",
          "control",
          "subject",
          "subject_name",
          "source_total",
          "imported_total",
          "difference",
          "explanation",
          "explained_by",
          "explained_at"
        ],
        "title": "MigrationControlTotalOut",
        "type": "object"
      },
      "MigrationCreate": {
        "properties": {
          "cutover_date": {
            "description": "The last day the old books cover. These books carry on from the next.",
            "format": "date",
            "title": "Cutover Date",
            "type": "string"
          },
          "mode": {
            "description": "`opening_balances`: what every account held on the cutover day, with the open invoices and bills. `full_history`: every entry of the old books up to the cutover day, entry for entry.",
            "title": "Mode",
            "type": "string"
          },
          "snapshot": {
            "$ref": "#/components/schemas/MigrationSource"
          },
          "source": {
            "description": "Where the books come from: `qbo`, `xero` or `csv` (a file, or anything else).",
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "source",
          "mode",
          "cutover_date",
          "snapshot"
        ],
        "title": "MigrationCreate",
        "type": "object"
      },
      "MigrationExplanationIn": {
        "properties": {
          "explanation": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the source and these books differ here; null takes the reason back.",
            "title": "Explanation"
          }
        },
        "required": [
          "explanation"
        ],
        "title": "MigrationExplanationIn",
        "type": "object"
      },
      "MigrationMappingIn": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "An account of these books; null to unmap.",
            "title": "Account Id"
          },
          "source_account_id": {
            "title": "Source Account Id",
            "type": "string"
          }
        },
        "required": [
          "source_account_id",
          "account_id"
        ],
        "title": "MigrationMappingIn",
        "type": "object"
      },
      "MigrationMappingOut": {
        "properties": {
          "account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Code"
          },
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account of these books it lands in; null until mapped.",
            "title": "Account Id"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Name"
          },
          "source_account_id": {
            "title": "Source Account Id",
            "type": "string"
          },
          "source_balance": {
            "description": "Its balance on the cutover day, positive on the debit side.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Source Balance",
            "type": "string"
          },
          "source_name": {
            "title": "Source Name",
            "type": "string"
          },
          "source_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Number"
          },
          "source_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Type"
          }
        },
        "required": [
          "source_account_id",
          "source_name",
          "source_number",
          "source_type",
          "source_balance",
          "account_id",
          "account_code",
          "account_name"
        ],
        "title": "MigrationMappingOut",
        "type": "object"
      },
      "MigrationMappingsUpdate": {
        "properties": {
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/MigrationMappingIn"
            },
            "maxItems": 5000,
            "minItems": 1,
            "title": "Mappings",
            "type": "array"
          }
        },
        "required": [
          "mappings"
        ],
        "title": "MigrationMappingsUpdate",
        "type": "object"
      },
      "MigrationPartyMappingIn": {
        "properties": {
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "A counterparty of these books; null to add one by name when the run posts.",
            "title": "Party Id"
          },
          "source_party_id": {
            "title": "Source Party Id",
            "type": "string"
          }
        },
        "required": [
          "source_party_id",
          "party_id"
        ],
        "title": "MigrationPartyMappingIn",
        "type": "object"
      },
      "MigrationPartyMappingOut": {
        "properties": {
          "open_items": {
            "description": "How many of the source's open items name it.",
            "title": "Open Items",
            "type": "integer"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "The counterparty of these books it is; null until mapped, and added by name when the run posts.",
            "title": "Party Id"
          },
          "party_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Name"
          },
          "source_name": {
            "title": "Source Name",
            "type": "string"
          },
          "source_party_id": {
            "title": "Source Party Id",
            "type": "string"
          },
          "source_total": {
            "description": "What its open items add up to: positive for what is owed.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Source Total",
            "type": "string"
          }
        },
        "required": [
          "source_party_id",
          "source_name",
          "open_items",
          "source_total",
          "party_id",
          "party_name"
        ],
        "title": "MigrationPartyMappingOut",
        "type": "object"
      },
      "MigrationPartyMappingsUpdate": {
        "properties": {
          "parties": {
            "items": {
              "$ref": "#/components/schemas/MigrationPartyMappingIn"
            },
            "maxItems": 20000,
            "minItems": 1,
            "title": "Parties",
            "type": "array"
          }
        },
        "required": [
          "parties"
        ],
        "title": "MigrationPartyMappingsUpdate",
        "type": "object"
      },
      "MigrationRunDetailOut": {
        "properties": {
          "control_totals": {
            "items": {
              "$ref": "#/components/schemas/MigrationControlTotalOut"
            },
            "title": "Control Totals",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "cutover_date": {
            "format": "date",
            "title": "Cutover Date",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `mig_`.",
            "examples": [
              "mig_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "mig"
          },
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/MigrationMappingOut"
            },
            "title": "Mappings",
            "type": "array"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "opening_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry it posted, once it has.",
            "title": "Opening Entry Id"
          },
          "parties": {
            "description": "The customers and vendors its open items name.",
            "items": {
              "$ref": "#/components/schemas/MigrationPartyMappingOut"
            },
            "title": "Parties",
            "type": "array"
          },
          "posted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posted At"
          },
          "row_version": {
            "title": "Row Version",
            "type": "integer"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "source_snapshot_hash": {
            "description": "sha256 of the snapshot it was given.",
            "title": "Source Snapshot Hash",
            "type": "string"
          },
          "status": {
            "description": "`draft` (accounts to map), `mapped`, `posted` (differences to explain), `tied_out` or `abandoned`.",
            "title": "Status",
            "type": "string"
          },
          "tied_out": {
            "description": "Every control total ties to the cent or has a reason.",
            "title": "Tied Out",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "source",
          "mode",
          "cutover_date",
          "status",
          "source_snapshot_hash",
          "opening_entry_id",
          "posted_at",
          "created_at",
          "row_version",
          "mappings",
          "parties",
          "control_totals",
          "tied_out"
        ],
        "title": "MigrationRunDetailOut",
        "type": "object"
      },
      "MigrationRunOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "cutover_date": {
            "format": "date",
            "title": "Cutover Date",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `mig_`.",
            "examples": [
              "mig_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "mig"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "opening_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The entry it posted, once it has.",
            "title": "Opening Entry Id"
          },
          "posted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posted At"
          },
          "row_version": {
            "title": "Row Version",
            "type": "integer"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "source_snapshot_hash": {
            "description": "sha256 of the snapshot it was given.",
            "title": "Source Snapshot Hash",
            "type": "string"
          },
          "status": {
            "description": "`draft` (accounts to map), `mapped`, `posted` (differences to explain), `tied_out` or `abandoned`.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source",
          "mode",
          "cutover_date",
          "status",
          "source_snapshot_hash",
          "opening_entry_id",
          "posted_at",
          "created_at",
          "row_version"
        ],
        "title": "MigrationRunOut",
        "type": "object"
      },
      "MigrationRunPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/MigrationRunOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "MigrationRunPage",
        "type": "object"
      },
      "MigrationSource": {
        "description": "The old books on the cutover day.",
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/SourceAccount"
            },
            "maxItems": 5000,
            "minItems": 1,
            "title": "Accounts",
            "type": "array"
          },
          "entries": {
            "description": "Every entry of the old books up to the cutover day, for a `full_history` migration.",
            "items": {
              "$ref": "#/components/schemas/SourceEntry"
            },
            "maxItems": 50000,
            "title": "Entries",
            "type": "array"
          },
          "open_items": {
            "description": "The AR and AP aging on the cutover day, item by item. They come in on their parties, and the aging is tied out party by party. Opening balances only.",
            "items": {
              "$ref": "#/components/schemas/SourceOpenItem"
            },
            "maxItems": 20000,
            "title": "Open Items",
            "type": "array"
          },
          "parties": {
            "description": "The customers and vendors the open items name.",
            "items": {
              "$ref": "#/components/schemas/SourceParty"
            },
            "maxItems": 20000,
            "title": "Parties",
            "type": "array"
          },
          "trial_balance": {
            "description": "The source's trial balance at the end of the cutover day: the figures every account is tied out against.",
            "items": {
              "$ref": "#/components/schemas/SourceBalance"
            },
            "title": "Trial Balance",
            "type": "array"
          }
        },
        "required": [
          "accounts",
          "trial_balance"
        ],
        "title": "MigrationSource",
        "type": "object"
      },
      "MissingAccrualOut": {
        "description": "A vendor whose bill was due in this month by the rhythm it keeps\n(monthly, quarterly or yearly) and has not come: a cost the month may need\naccrued before it is closed (decisions 0149, 0152).",
        "properties": {
          "amount": {
            "description": "Its usual bill: the median of the bills that set its rhythm, what approving accrues unless another estimate is named.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "counterparty_id": {
            "description": "The vendor.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "counterparty_name": {
            "description": "Its name.",
            "title": "Counterparty Name",
            "type": "string"
          },
          "every_months": {
            "description": "Months between its bills: 1, 3, 12 (monthly, quarterly, yearly).",
            "title": "Every Months",
            "type": "integer"
          },
          "exception_id": {
            "description": "The Inbox item asking about it. `POST /exceptions/{id}/approve` accrues it; dismissing it says the month owes nothing.",
            "examples": [
              "exc_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Exception Id",
            "type": "string",
            "x-id-prefix": "exc"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its logo, when it has one; null for initials.",
            "title": "Logo Url"
          },
          "recommendation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecommendationOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expense account, and department, its charges are filed to: where approving accrues it. Null when its charges are not filed yet, so approving names one."
          },
          "usual_day": {
            "description": "The day of the month its charge usually lands.",
            "title": "Usual Day",
            "type": "integer"
          }
        },
        "required": [
          "exception_id",
          "counterparty_id",
          "counterparty_name",
          "amount",
          "usual_day",
          "every_months",
          "recommendation"
        ],
        "title": "MissingAccrualOut",
        "type": "object"
      },
      "ModelProposalOut": {
        "properties": {
          "agreed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether that person agreed. Null until someone filed it.",
            "title": "Agreed"
          },
          "confidence": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "0 to 1, as the model said.",
            "title": "Confidence"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "evidence": {
            "description": "What the books showed the model when they researched it. Empty for a proposal from a categorizer batch.",
            "items": {
              "$ref": "#/components/schemas/EvidenceOut"
            },
            "title": "Evidence",
            "type": "array"
          },
          "human_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where a person filed the transaction afterwards, if they have.",
            "title": "Human Account Id"
          },
          "id": {
            "description": "An id that starts with `prop_`.",
            "examples": [
              "prop_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "prop"
          },
          "model": {
            "description": "The model or prompt version that answered.",
            "title": "Model",
            "type": "string"
          },
          "outcome": {
            "description": "What became of it: `posted` (filed on its own), `below_confidence`, `above_materiality`, `new_counterparty` (held for a person by that gate) or `invalid`.",
            "enum": [
              "posted",
              "below_confidence",
              "above_materiality",
              "new_counterparty",
              "invalid"
            ],
            "title": "Outcome",
            "type": "string"
          },
          "prompt_version": {
            "title": "Prompt Version",
            "type": "string"
          },
          "proposed_account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposed Account Code"
          },
          "proposed_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account proposed. Null when the model named none it may use.",
            "title": "Proposed Account Id"
          },
          "proposed_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposed Account Name"
          },
          "proposed_department_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department proposed: a value of the department dimension.",
            "title": "Proposed Department Id"
          },
          "proposed_department_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposed Department Name"
          },
          "proposed_spread": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SpreadOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The prepaid spread proposed, when the payment buys more than a month."
          },
          "reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model's one line on why.",
            "title": "Reasoning"
          },
          "transaction_id": {
            "description": "The transaction it is about.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Transaction Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "id",
          "transaction_id",
          "model",
          "prompt_version",
          "outcome",
          "created_at"
        ],
        "title": "ModelProposalOut",
        "type": "object"
      },
      "ModelProposalPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ModelProposalOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ModelProposalPage",
        "type": "object"
      },
      "ModelQualityOut": {
        "description": "How often a person agreed with the model, out of how many they judged.\n\nReported rather than assumed. A product that files transactions with a\nmodel and cannot say how often it is right is asking to be trusted rather\nthan earning it.",
        "properties": {
          "agreed": {
            "title": "Agreed",
            "type": "integer"
          },
          "agreement_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreement Rate"
          },
          "judged": {
            "title": "Judged",
            "type": "integer"
          }
        },
        "required": [
          "judged",
          "agreed",
          "agreement_rate"
        ],
        "title": "ModelQualityOut",
        "type": "object"
      },
      "Money": {
        "description": "An amount and its currency. ``amount`` is a base-10 string with two to\nfour decimal places \u2014 two unless the currency counts finer, as a dinar\ndoes \u2014 and an optional leading minus sign. Parse it with a decimal type,\nnot a float.",
        "properties": {
          "amount": {
            "examples": [
              "1234.50"
            ],
            "pattern": "^-?\\d+\\.\\d{2,4}$",
            "title": "Amount",
            "type": "string"
          },
          "currency": {
            "description": "ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "pattern": "^[A-Z]{3}$",
            "title": "Currency",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "title": "Money",
        "type": "object"
      },
      "MonthReviewsOut": {
        "description": "Every account a month's close reviews.",
        "properties": {
          "close_run_id": {
            "anyOf": [
              {
                "description": "An id that starts with `close_run_`.",
                "examples": [
                  "close_run_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "close_run"
              },
              {
                "type": "null"
              }
            ],
            "description": "The month's newest close run, or null while its close has not started.",
            "title": "Close Run Id"
          },
          "data": {
            "description": "Each asset and liability account with a balance at the month's end, or with a review, other than bank and card accounts (those are reconciled), in the chart's order.",
            "items": {
              "$ref": "#/components/schemas/AccountUnderReviewOut"
            },
            "title": "Data",
            "type": "array"
          },
          "editable": {
            "description": "Whether the month is open, so reviews can be written.",
            "title": "Editable",
            "type": "boolean"
          },
          "open": {
            "description": "How many reviews are written and not yet marked reviewed.",
            "title": "Open",
            "type": "integer"
          },
          "period": {
            "description": "The month, like 2026-09.",
            "title": "Period",
            "type": "string"
          },
          "reviewed": {
            "description": "How many of its accounts are marked reviewed.",
            "title": "Reviewed",
            "type": "integer"
          }
        },
        "required": [
          "period",
          "close_run_id",
          "editable",
          "reviewed",
          "open",
          "data"
        ],
        "title": "MonthReviewsOut",
        "type": "object"
      },
      "NewAccount": {
        "properties": {
          "code": {
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "control_role": {
            "anyOf": [
              {
                "enum": [
                  "ar",
                  "ap",
                  "processor_clearing"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Make it a control account: every line on it must then name its party.",
            "title": "Control Role"
          },
          "is_postable": {
            "default": true,
            "title": "Is Postable",
            "type": "boolean"
          },
          "name": {
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "code",
          "name",
          "type"
        ],
        "title": "NewAccount",
        "type": "object"
      },
      "NewAccountReview": {
        "properties": {
          "account_id": {
            "description": "An asset or liability account of these books that takes postings, other than a bank or card account.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "evidence": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the support is, and what explains any difference.",
            "title": "Evidence"
          },
          "period": {
            "description": "The month the review is for, like 2026-09.",
            "title": "Period",
            "type": "string"
          },
          "status": {
            "default": "open",
            "description": "`reviewed` to mark it reviewed at once, which needs `support_balance`, and `evidence` when the two balances differ. Defaults to `open`.",
            "enum": [
              "open",
              "reviewed"
            ],
            "title": "Status",
            "type": "string"
          },
          "support_balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,21}0*$)\\d{0,16}\\.\\d{0,4}0*$)",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the support says the account holds at the month's end.",
            "title": "Support Balance"
          }
        },
        "required": [
          "period",
          "account_id"
        ],
        "title": "NewAccountReview",
        "type": "object"
      },
      "NewBatch": {
        "properties": {
          "entries": {
            "description": "Up to 1000 entries, posted together or not at all.",
            "items": {
              "$ref": "#/components/schemas/NewBatchEntry"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Entries",
            "type": "array"
          }
        },
        "required": [
          "entries"
        ],
        "title": "NewBatch",
        "type": "object"
      },
      "NewBatchEntry": {
        "properties": {
          "description": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "idempotency_key": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Posts this entry once, however many batches send it: the source object's own id is a good key for a backfill. Defaults to one derived from the request's `Idempotency-Key` and the entry's place.",
            "title": "Idempotency Key"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/NewLine"
            },
            "minItems": 2,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          }
        },
        "required": [
          "entry_date",
          "description",
          "lines"
        ],
        "title": "NewBatchEntry",
        "type": "object"
      },
      "NewBoardPack": {
        "properties": {
          "period": {
            "description": "A closed month, like 2026-09.",
            "title": "Period",
            "type": "string"
          }
        },
        "required": [
          "period"
        ],
        "title": "NewBoardPack",
        "type": "object"
      },
      "NewCloseTask": {
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "A member of these books who does it. Omit for nobody.",
            "title": "Assignee Id"
          },
          "blocking": {
            "default": true,
            "description": "Whether a month's close waits on it. Defaults to true.",
            "title": "Blocking",
            "type": "boolean"
          },
          "depends_on_ids": {
            "description": "Tasks of these books it waits on: it is not signed off for a month until they are.",
            "items": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "task"
            },
            "maxItems": 50,
            "title": "Depends On Ids",
            "type": "array"
          },
          "details": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How to do it, or where to look.",
            "title": "Details"
          },
          "due_days": {
            "anyOf": [
              {
                "maximum": 60.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Due this many days after each month ends. Omit for no due day.",
            "title": "Due Days"
          },
          "title": {
            "description": "What has to be done, in a line.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "NewCloseTask",
        "type": "object"
      },
      "NewComment": {
        "properties": {
          "about": {
            "enum": [
              "transaction",
              "journal_entry"
            ],
            "title": "About",
            "type": "string"
          },
          "body": {
            "maxLength": 5000,
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "mentions": {
            "description": "Members to tell, by user id.",
            "items": {
              "description": "An id that starts with `usr_`.",
              "examples": [
                "usr_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "usr"
            },
            "maxItems": 20,
            "title": "Mentions",
            "type": "array"
          },
          "proposed_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Propose the GL account a transaction belongs in: one it could be filed under. The people who may post are told; nothing is filed. Transactions only.",
            "title": "Proposed Account Id"
          },
          "subject_id": {
            "description": "An id. Which resource it names is given by the field beside it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          }
        },
        "required": [
          "about",
          "subject_id",
          "body"
        ],
        "title": "NewComment",
        "type": "object"
      },
      "NewCounterparty": {
        "properties": {
          "country": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z]{2}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "default_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Account Id"
          },
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "is_customer": {
            "default": false,
            "title": "Is Customer",
            "type": "boolean"
          },
          "is_vendor": {
            "default": false,
            "title": "Is Vendor",
            "type": "boolean"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "maximum": 365.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Days"
          },
          "region": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "tax_classification": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Classification"
          },
          "w9_received_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "W9 Received On"
          },
          "website": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their website; their logo is looked for there.",
            "title": "Website"
          }
        },
        "required": [
          "name"
        ],
        "title": "NewCounterparty",
        "type": "object"
      },
      "NewDimension": {
        "properties": {
          "key": {
            "description": "Lower-case letters, digits and underscores, e.g. `department`.",
            "pattern": "^[a-z][a-z0-9_]{0,39}$",
            "title": "Key",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "key",
          "name"
        ],
        "title": "NewDimension",
        "type": "object"
      },
      "NewDimensionValue": {
        "properties": {
          "code": {
            "maxLength": 40,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "A value of the same dimension to place this one under.",
            "title": "Parent Id"
          }
        },
        "required": [
          "code",
          "name"
        ],
        "title": "NewDimensionValue",
        "type": "object"
      },
      "NewDraft": {
        "properties": {
          "description": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/NewDraftLine"
            },
            "maxItems": 500,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          }
        },
        "required": [
          "entry_date",
          "description"
        ],
        "title": "NewDraft",
        "type": "object"
      },
      "NewDraftLine": {
        "additionalProperties": false,
        "description": "A draft's line. It may leave out a dimension its account requires:\nthat is asked for when the draft posts (`dimension_required`). A value\nthat is not of the dimension named is refused now (`dimension_invalid`).\nA foreign amount is kept as given and held to the line's amount when the\ndraft posts (`foreign_amount_mismatch`); a currency LedgerIt does not\nknow is refused now.",
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "dimensions": {
            "description": "At most one value per dimension, kept with the line and posted with it.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "foreign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForeignIn"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a line that moved in another currency: that currency, the amount in it and the rate. `amount` must be that amount at that rate, to the books' minor unit; refused with `foreign_amount_mismatch` otherwise."
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the line is with: a counterparty of these books. Required on a control account (`control_role` on the account); refused with `party_required` without one.",
            "title": "Party Id"
          }
        },
        "required": [
          "account_id",
          "direction",
          "amount"
        ],
        "title": "NewDraftLine",
        "type": "object"
      },
      "NewEntry": {
        "properties": {
          "description": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/NewLine"
            },
            "minItems": 2,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          }
        },
        "required": [
          "entry_date",
          "description",
          "lines"
        ],
        "title": "NewEntry",
        "type": "object"
      },
      "NewLine": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "dimensions": {
            "description": "At most one value per dimension. Refused with `dimension_required` when the account requires a dimension the line leaves out, and `dimension_invalid` when a value is not of the dimension named.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "foreign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForeignIn"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a line that moved in another currency: that currency, the amount in it and the rate. `amount` must be that amount at that rate, to the books' minor unit; refused with `foreign_amount_mismatch` otherwise."
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the line is with: a counterparty of these books. Required on a control account (`control_role` on the account); refused with `party_required` without one.",
            "title": "Party Id"
          }
        },
        "required": [
          "account_id",
          "direction",
          "amount"
        ],
        "title": "NewLine",
        "type": "object"
      },
      "NewPartyRole": {
        "properties": {
          "form_1099_category": {
            "anyOf": [
              {
                "enum": [
                  "nec",
                  "misc"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`nec` or `misc`, for a 1099-eligible vendor.",
            "title": "Form 1099 Category"
          },
          "is_1099_eligible": {
            "default": false,
            "description": "A vendor paid on a 1099.",
            "title": "Is 1099 Eligible",
            "type": "boolean"
          },
          "role": {
            "description": "customer, vendor, employee, investor, lender or founder.",
            "enum": [
              "customer",
              "vendor",
              "employee",
              "investor",
              "lender",
              "founder"
            ],
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "title": "NewPartyRole",
        "type": "object"
      },
      "NewQuestion": {
        "properties": {
          "about": {
            "enum": [
              "transaction",
              "journal_entry"
            ],
            "title": "About",
            "type": "string"
          },
          "ask_anyway": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Send it even when a rule covers the transaction. Without it, a question about a transaction no person or rule has decided, that a rule covers, is not sent: the rule files it.",
            "title": "Ask Anyway"
          },
          "asked_of": {
            "description": "The member who should answer, by user id.",
            "examples": [
              "usr_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Asked Of",
            "type": "string",
            "x-id-prefix": "usr"
          },
          "body": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "subject_id": {
            "description": "An id. Which resource it names is given by the field beside it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          }
        },
        "required": [
          "about",
          "subject_id",
          "asked_of",
          "body"
        ],
        "title": "NewQuestion",
        "type": "object"
      },
      "NewRule": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "amount_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Max"
          },
          "amount_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Min"
          },
          "category_account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "dimensions": {
            "description": "The department, and the value of any other dimension, a matching transaction is to name, at most one per dimension. Refused with `dimension_invalid` when a value is not of the dimension named.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          },
          "document_kind": {
            "anyOf": [
              {
                "enum": [
                  "invoice",
                  "receipt",
                  "none"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only transactions with this paper behind them: an `invoice` or a `receipt` linked as evidence, or `none` for one with no paper at all. Null when the rule does not care.",
            "title": "Document Kind"
          },
          "event_type": {
            "anyOf": [
              {
                "enum": [
                  "expense",
                  "income",
                  "transfer",
                  "fee",
                  "interest",
                  "refund",
                  "sales_refund"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type"
          },
          "match_on": {
            "default": "description",
            "enum": [
              "description",
              "source_description",
              "counterparty"
            ],
            "title": "Match On",
            "type": "string"
          },
          "match_type": {
            "default": "contains",
            "enum": [
              "contains",
              "equals",
              "starts_with"
            ],
            "title": "Match Type",
            "type": "string"
          },
          "memo_pattern": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only transactions whose memo \u2014 the description the ledger shows, or the line the bank printed \u2014 holds these words. Compared as `pattern` is: case-insensitively, processor noise removed. Null when the rule does not look at the memo.",
            "title": "Memo Pattern"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "pattern": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Pattern",
            "type": "string"
          },
          "priority": {
            "default": 0,
            "maximum": 1000.0,
            "minimum": -1000.0,
            "title": "Priority",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "pattern",
          "category_account_id"
        ],
        "title": "NewRule",
        "type": "object"
      },
      "NewVersionIn": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its name; the source's if empty.",
            "title": "Name"
          }
        },
        "title": "NewVersionIn",
        "type": "object"
      },
      "NotificationOut": {
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "More detail, in English, when there is any.",
            "title": "Body"
          },
          "channels": {
            "description": "Where it goes, as the caller's preferences for its `type` stood when it was written.",
            "items": {
              "enum": [
                "in_app",
                "email",
                "slack",
                "whatsapp"
              ],
              "type": "string"
            },
            "title": "Channels",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "additionalProperties": true,
            "description": "The facts behind the notice, by `type`: ids to link to, amounts, dates.",
            "title": "Data",
            "type": "object"
          },
          "delivered_channels": {
            "description": "Where it has got to so far: `in_app` at once, `email` once the email is sent.",
            "items": {
              "enum": [
                "in_app",
                "email",
                "slack",
                "whatsapp"
              ],
              "type": "string"
            },
            "title": "Delivered Channels",
            "type": "array"
          },
          "id": {
            "description": "An id that starts with `ntf_`.",
            "examples": [
              "ntf_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "ntf"
          },
          "read": {
            "description": "Whether the caller has seen it.",
            "title": "Read",
            "type": "boolean"
          },
          "severity": {
            "description": "`warning` when something is wrong until someone acts; `info` otherwise.",
            "enum": [
              "info",
              "warning"
            ],
            "title": "Severity",
            "type": "string"
          },
          "title": {
            "description": "One line, in English. Render `type` and `data` to localize.",
            "title": "Title",
            "type": "string"
          },
          "type": {
            "description": "What happened. Decides the keys in `data`.",
            "enum": [
              "connection_failing",
              "transactions_need_review",
              "receipt_missing",
              "period_closed",
              "period_reopened",
              "member_joined",
              "mentioned",
              "question_asked",
              "question_answered",
              "filing_proposed",
              "weekly_digest",
              "entity_deletion_scheduled",
              "plan_moving"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "severity",
          "title",
          "body",
          "data",
          "read",
          "channels",
          "delivered_channels",
          "created_at"
        ],
        "title": "NotificationOut",
        "type": "object"
      },
      "NotificationPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/NotificationOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "unread_count": {
            "description": "How many of the caller's notifications in these books are unread, in all pages.",
            "title": "Unread Count",
            "type": "integer"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor",
          "unread_count"
        ],
        "title": "NotificationPage",
        "type": "object"
      },
      "NotificationPreferencesIn": {
        "properties": {
          "categories": {
            "description": "The categories to turn off or back on. Those left out stay as they are.",
            "items": {
              "$ref": "#/components/schemas/CategoryPreference"
            },
            "maxItems": 7,
            "title": "Categories",
            "type": "array"
          },
          "kinds": {
            "description": "The kinds to send to new channels, applied after `categories`. Those left out stay as they are.",
            "items": {
              "$ref": "#/components/schemas/KindPreferenceIn"
            },
            "maxItems": 11,
            "title": "Kinds",
            "type": "array"
          }
        },
        "title": "NotificationPreferencesIn",
        "type": "object"
      },
      "NotificationPreferencesOut": {
        "properties": {
          "categories": {
            "description": "Every category, in display order.",
            "items": {
              "$ref": "#/components/schemas/CategoryPreference"
            },
            "title": "Categories",
            "type": "array"
          },
          "channels_available": {
            "description": "The channels a notice can reach the caller on in these books, in display order: the app and email always, `slack` while the books have a working Slack workspace connected, and `whatsapp` while the caller's WhatsApp number is linked to these books.",
            "items": {
              "enum": [
                "in_app",
                "email",
                "slack",
                "whatsapp"
              ],
              "type": "string"
            },
            "title": "Channels Available",
            "type": "array"
          },
          "kinds": {
            "description": "Every kind the caller may choose channels for, in display order. A kind that cannot be changed, such as the books being scheduled for deletion, is not listed.",
            "items": {
              "$ref": "#/components/schemas/KindPreferenceOut"
            },
            "title": "Kinds",
            "type": "array"
          }
        },
        "required": [
          "channels_available",
          "categories",
          "kinds"
        ],
        "title": "NotificationPreferencesOut",
        "type": "object"
      },
      "OpenItemDetailOut": {
        "properties": {
          "allocations": {
            "items": {
              "$ref": "#/components/schemas/AllocationOut"
            },
            "title": "Allocations",
            "type": "array"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "due_on": {
            "description": "The issue day plus the party's payment terms; a payment's own day.",
            "format": "date",
            "title": "Due On",
            "type": "string"
          },
          "entry_id": {
            "description": "The journal entry its line is on.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "entry_no": {
            "title": "Entry No",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `oi_`.",
            "examples": [
              "oi_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "oi"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "ledger": {
            "description": "`ar` or `ap`.",
            "title": "Ledger",
            "type": "string"
          },
          "original_amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Original Amount",
            "type": "string"
          },
          "owed": {
            "description": "`remaining`, positive when owed (an invoice on AR, a bill on AP) and negative when it is a payment not yet applied.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Owed",
            "type": "string"
          },
          "party_id": {
            "description": "The counterparty it is with.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "party_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Name"
          },
          "remaining": {
            "description": "What it has left once its allocations are counted.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Remaining",
            "type": "string"
          },
          "side": {
            "description": "`debit` or `credit`: the side of its line. A debit item is settled by a credit item.",
            "title": "Side",
            "type": "string"
          },
          "subject": {
            "description": "`invoice`, `bill` or `payment` (`credit` and `advance` come with documents).",
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "id",
          "ledger",
          "party_id",
          "party_name",
          "subject",
          "side",
          "entry_id",
          "entry_no",
          "issued_on",
          "due_on",
          "original_amount",
          "remaining",
          "owed",
          "currency",
          "allocations"
        ],
        "title": "OpenItemDetailOut",
        "type": "object"
      },
      "OpenItemOut": {
        "properties": {
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "due_on": {
            "description": "The issue day plus the party's payment terms; a payment's own day.",
            "format": "date",
            "title": "Due On",
            "type": "string"
          },
          "entry_id": {
            "description": "The journal entry its line is on.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "entry_no": {
            "title": "Entry No",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `oi_`.",
            "examples": [
              "oi_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "oi"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "ledger": {
            "description": "`ar` or `ap`.",
            "title": "Ledger",
            "type": "string"
          },
          "original_amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Original Amount",
            "type": "string"
          },
          "owed": {
            "description": "`remaining`, positive when owed (an invoice on AR, a bill on AP) and negative when it is a payment not yet applied.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Owed",
            "type": "string"
          },
          "party_id": {
            "description": "The counterparty it is with.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "party_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Party Name"
          },
          "remaining": {
            "description": "What it has left once its allocations are counted.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Remaining",
            "type": "string"
          },
          "side": {
            "description": "`debit` or `credit`: the side of its line. A debit item is settled by a credit item.",
            "title": "Side",
            "type": "string"
          },
          "subject": {
            "description": "`invoice`, `bill` or `payment` (`credit` and `advance` come with documents).",
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "id",
          "ledger",
          "party_id",
          "party_name",
          "subject",
          "side",
          "entry_id",
          "entry_no",
          "issued_on",
          "due_on",
          "original_amount",
          "remaining",
          "owed",
          "currency"
        ],
        "title": "OpenItemOut",
        "type": "object"
      },
      "OpenItemPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/OpenItemOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "OpenItemPage",
        "type": "object"
      },
      "OpeningBalanceIn": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Balance"
          }
        },
        "required": [
          "account_id",
          "balance"
        ],
        "title": "OpeningBalanceIn",
        "type": "object"
      },
      "OpeningBalancesOut": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "As Of"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "difference": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Id"
          },
          "entry_no": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry No"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/OpeningLineOut"
            },
            "title": "Lines",
            "type": "array"
          }
        },
        "required": [
          "currency",
          "entry_id",
          "entry_no",
          "as_of",
          "lines",
          "difference"
        ],
        "title": "OpeningBalancesOut",
        "type": "object"
      },
      "OpeningLineOut": {
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Balance",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "account_code",
          "account_name",
          "balance"
        ],
        "title": "OpeningLineOut",
        "type": "object"
      },
      "OwnerMoney": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why, kept on the filing.",
            "title": "Note"
          },
          "purpose": {
            "description": "What it is, as the company's owners have it (`transactions.list_capital_options`). Money in: `owner_loan` (a loan from a shareholder or member, 2950), `stock_purchase` (shares, 3100 Common stock; corporations only) or `contribution` (3300 Additional paid-in capital for a corporation, 3500 for an LLC or a sole proprietor). Money out: `owner_loan_repayment` (2950) or `distribution` (3600: a dividend, a member distribution or an owner draw).",
            "enum": [
              "owner_loan",
              "stock_purchase",
              "contribution",
              "owner_loan_repayment",
              "distribution"
            ],
            "title": "Purpose",
            "type": "string"
          }
        },
        "required": [
          "purpose"
        ],
        "title": "OwnerMoney",
        "type": "object"
      },
      "PartyRoleChanges": {
        "description": "Only the fields sent change.",
        "properties": {
          "form_1099_category": {
            "anyOf": [
              {
                "enum": [
                  "nec",
                  "misc"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`nec` or `misc`; null clears it.",
            "title": "Form 1099 Category"
          },
          "is_1099_eligible": {
            "description": "A vendor paid on a 1099.",
            "title": "Is 1099 Eligible",
            "type": "boolean"
          }
        },
        "title": "PartyRoleChanges",
        "type": "object"
      },
      "PartyRoleOut": {
        "properties": {
          "counterparty_id": {
            "description": "The counterparty holding the role.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "form_1099_category": {
            "anyOf": [
              {
                "enum": [
                  "nec",
                  "misc"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`nec` or `misc`: the form they are paid on. Null unless 1099-eligible.",
            "title": "Form 1099 Category"
          },
          "id": {
            "description": "An id that starts with `party_role_`.",
            "examples": [
              "party_role_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "party_role"
          },
          "is_1099_eligible": {
            "description": "A vendor paid on a 1099. Only a vendor role can be.",
            "title": "Is 1099 Eligible",
            "type": "boolean"
          },
          "role": {
            "description": "customer, vendor, employee, investor, lender or founder.",
            "enum": [
              "customer",
              "vendor",
              "employee",
              "investor",
              "lender",
              "founder"
            ],
            "title": "Role",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "counterparty_id",
          "role",
          "is_1099_eligible",
          "form_1099_category",
          "created_at",
          "updated_at"
        ],
        "title": "PartyRoleOut",
        "type": "object"
      },
      "PartyRolePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PartyRoleOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "PartyRolePage",
        "type": "object"
      },
      "PaymentApply": {
        "properties": {
          "applications": {
            "items": {
              "$ref": "#/components/schemas/ApplicationIn"
            },
            "maxItems": 500,
            "title": "Applications",
            "type": "array"
          },
          "oldest_first": {
            "default": false,
            "description": "Apply what is left to the oldest open invoices or bills.",
            "title": "Oldest First",
            "type": "boolean"
          }
        },
        "title": "PaymentApply",
        "type": "object"
      },
      "PaymentChange": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "destination_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dest_`.",
                "examples": [
                  "dest_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dest"
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination Id"
          },
          "effective_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective On"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "reference": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference"
          }
        },
        "title": "PaymentChange",
        "type": "object"
      },
      "PaymentOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "applied_to": {
            "items": {
              "$ref": "#/components/schemas/AppliedOut"
            },
            "title": "Applied To",
            "type": "array"
          },
          "approved": {
            "description": "For a payment not yet sent: an approval of it as it now is stands.",
            "title": "Approved",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "destination_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dest_`.",
                "examples": [
                  "dest_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where a payment LedgerIt sends goes (that version of it).",
            "title": "Destination Id"
          },
          "direction": {
            "title": "Direction",
            "type": "string"
          },
          "effective_on": {
            "format": "date",
            "title": "Effective On",
            "type": "string"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Id"
          },
          "id": {
            "description": "An id that starts with `pay_`.",
            "examples": [
              "pay_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "pay"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference"
          },
          "status": {
            "description": "A recorded payment is `settled` once on the books and `void` once reversed. One LedgerIt sends is `created`, `approved` once released, `submitted` once sent to its provider, `failed` when the provider says nothing was sent, or `cancelled`.",
            "title": "Status",
            "type": "string"
          },
          "submission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubmissionOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "How it was sent, for a payment LedgerIt sent."
          },
          "unapplied": {
            "description": "What is not yet applied to an invoice or bill; 0 for a void payment.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unapplied",
            "type": "string"
          },
          "void_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Void Entry Id"
          },
          "voided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voided At"
          }
        },
        "required": [
          "id",
          "direction",
          "kind",
          "party_id",
          "amount",
          "currency",
          "effective_on",
          "account_id",
          "status",
          "unapplied",
          "applied_to",
          "destination_id",
          "approved",
          "submission",
          "reference",
          "memo",
          "entry_id",
          "void_entry_id",
          "voided_at",
          "created_at"
        ],
        "title": "PaymentOut",
        "type": "object"
      },
      "PaymentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PaymentOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "PaymentPage",
        "type": "object"
      },
      "PaymentRecord": {
        "properties": {
          "account_id": {
            "description": "The bank or cash account it moved through, or a card for money out.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "applications": {
            "description": "The invoices or bills it pays, and how much of each.",
            "items": {
              "$ref": "#/components/schemas/ApplicationIn"
            },
            "maxItems": 500,
            "title": "Applications",
            "type": "array"
          },
          "direction": {
            "description": "`in` from a customer, or `out` to a vendor.",
            "title": "Direction",
            "type": "string"
          },
          "effective_on": {
            "description": "The day the money moved.",
            "format": "date",
            "title": "Effective On",
            "type": "string"
          },
          "kind": {
            "description": "`customer` (money in) or `vendor` (money out).",
            "title": "Kind",
            "type": "string"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "oldest_first": {
            "default": false,
            "description": "Apply it to the party's open invoices or bills, the earliest due first, until it runs out.",
            "title": "Oldest First",
            "type": "boolean"
          },
          "party_id": {
            "description": "The customer or vendor: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "reference": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bank's reference, a check number.",
            "title": "Reference"
          }
        },
        "required": [
          "direction",
          "kind",
          "party_id",
          "amount",
          "effective_on",
          "account_id"
        ],
        "title": "PaymentRecord",
        "type": "object"
      },
      "PaymentSend": {
        "properties": {
          "account_id": {
            "description": "The bank or cash account it is paid from.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "destination_id": {
            "description": "Where it goes: one of the vendor's payment destinations.",
            "examples": [
              "dest_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Destination Id",
            "type": "string",
            "x-id-prefix": "dest"
          },
          "effective_on": {
            "description": "The day it is to be paid.",
            "format": "date",
            "title": "Effective On",
            "type": "string"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "description": "The vendor: a counterparty of these books.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "reference": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference"
          }
        },
        "required": [
          "party_id",
          "amount",
          "effective_on",
          "account_id",
          "destination_id"
        ],
        "title": "PaymentSend",
        "type": "object"
      },
      "PaymentVoid": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it is voided; written on the reversal.",
            "title": "Reason"
          }
        },
        "title": "PaymentVoid",
        "type": "object"
      },
      "PayoffOut": {
        "properties": {
          "interest": {
            "description": "The interest accrued and unpaid by that day, including days not yet accrued.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Interest",
            "type": "string"
          },
          "on": {
            "description": "The day it would be paid off.",
            "format": "date",
            "title": "On",
            "type": "string"
          },
          "principal": {
            "description": "The principal still owed.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Principal",
            "type": "string"
          },
          "total": {
            "description": "Principal and interest together: what pays it off.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "on",
          "principal",
          "interest",
          "total"
        ],
        "title": "PayoffOut",
        "type": "object"
      },
      "PeriodCloseList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PeriodCloseOut"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "PeriodCloseList",
        "type": "object"
      },
      "PeriodCloseOut": {
        "properties": {
          "closed_at": {
            "format": "date-time",
            "title": "Closed At",
            "type": "string"
          },
          "closed_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed By"
          },
          "closing_credits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Closing Credits",
            "type": "string"
          },
          "closing_debits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Closing Debits",
            "type": "string"
          },
          "forced": {
            "description": "Closed past blockers, deliberately.",
            "title": "Forced",
            "type": "boolean"
          },
          "locked_through_sequence": {
            "description": "The book's posting sequence at this close: the month as closed is every entry up to it.",
            "title": "Locked Through Sequence",
            "type": "integer"
          },
          "reopening": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReopeningOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "What undid this close, if something did. Null for the standing close."
          },
          "version": {
            "description": "1 for the first close, then one more per re-close.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "closed_at",
          "closed_by",
          "closing_debits",
          "closing_credits",
          "locked_through_sequence",
          "forced",
          "reopening"
        ],
        "title": "PeriodCloseOut",
        "type": "object"
      },
      "PeriodOut": {
        "properties": {
          "close_version": {
            "default": 0,
            "description": "How many times the month has been closed; each close is kept (`GET /periods/{key}/closes`).",
            "title": "Close Version",
            "type": "integer"
          },
          "closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "closing_credits": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closing Credits"
          },
          "closing_debits": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closing Debits"
          },
          "ends_on": {
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "fiscal_year": {
            "description": "The fiscal year the month is in, named for the calendar year it ends in.",
            "title": "Fiscal Year",
            "type": "integer"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "locked_through_sequence": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "While closed: the book's posting sequence at the close. The month's figures are every entry up to it.",
            "title": "Locked Through Sequence"
          },
          "soft_closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the month was soft-closed; null unless it is.",
            "title": "Soft Closed At"
          },
          "starts_on": {
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "status": {
            "enum": [
              "open",
              "soft_closed",
              "locked"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "key",
          "starts_on",
          "ends_on",
          "status",
          "closed_at",
          "closing_debits",
          "closing_credits",
          "fiscal_year"
        ],
        "title": "PeriodOut",
        "type": "object"
      },
      "PeriodPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PeriodOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "PeriodPage",
        "type": "object"
      },
      "PersonOut": {
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/ContributorOut"
          },
          "member": {
            "description": "Whether they are in these books now.",
            "title": "Member",
            "type": "boolean"
          },
          "member_since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When they joined these books.",
            "title": "Member Since"
          }
        },
        "required": [
          "actor",
          "member"
        ],
        "title": "PersonOut",
        "type": "object"
      },
      "PlanListOut": {
        "description": "The price list (decision 0126).",
        "properties": {
          "currency": {
            "description": "Always `USD`.",
            "title": "Currency",
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/PlanOut"
            },
            "title": "Data",
            "type": "array"
          },
          "extra_entity_monthly_price": {
            "description": "Each set of books beyond the first on a paid plan, a month.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Extra Entity Monthly Price",
            "type": "string"
          },
          "spend_window_months": {
            "description": "Months the spend is averaged over, and months in a row over a ceiling before a plan moves up.",
            "title": "Spend Window Months",
            "type": "integer"
          },
          "trial_days": {
            "description": "Days free on an organization's first paid plan.",
            "title": "Trial Days",
            "type": "integer"
          }
        },
        "required": [
          "data",
          "currency",
          "extra_entity_monthly_price",
          "trial_days",
          "spend_window_months"
        ],
        "title": "PlanListOut",
        "type": "object"
      },
      "PlanOut": {
        "description": "One plan on the price list.",
        "properties": {
          "entities_included": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sets of books included; null when every set beyond the first is an add-on.",
            "title": "Entities Included"
          },
          "id": {
            "description": "`starter`, `founder`, `growth` or `scale`, cheapest first.",
            "title": "Id",
            "type": "string"
          },
          "monthly_price": {
            "description": "US dollars a month on monthly billing; Scale's is where it starts.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Monthly Price",
            "type": "string"
          },
          "spend_ceiling": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The most monthly spend the plan covers, in US dollars; null for none.",
            "title": "Spend Ceiling"
          },
          "yearly_price": {
            "description": "US dollars for a year paid up front: ten months.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Yearly Price",
            "type": "string"
          }
        },
        "required": [
          "id",
          "monthly_price",
          "yearly_price",
          "spend_ceiling",
          "entities_included"
        ],
        "title": "PlanOut",
        "type": "object"
      },
      "PreviousBillOut": {
        "properties": {
          "bill_date": {
            "format": "date",
            "title": "Bill Date",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `bill_`.",
            "examples": [
              "bill_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "bill"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "vendor_number": {
            "description": "The vendor's own number for it.",
            "title": "Vendor Number",
            "type": "string"
          }
        },
        "required": [
          "id",
          "vendor_number",
          "bill_date",
          "total"
        ],
        "title": "PreviousBillOut",
        "type": "object"
      },
      "QaToleranceCreate": {
        "properties": {
          "counterparty_id": {
            "description": "The vendor to widen it for.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "kind": {
            "description": "The check to widen.",
            "enum": [
              "unusual_amount",
              "possible_repeat",
              "missing_accrual"
            ],
            "title": "Kind",
            "type": "string"
          },
          "multiplier": {
            "anyOf": [
              {
                "maximum": 1000.0,
                "minimum": 1.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "2",
            "description": "How many times wider: 2 (the default) doubles the threshold.",
            "title": "Multiplier"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why.",
            "title": "Note"
          }
        },
        "required": [
          "kind",
          "counterparty_id"
        ],
        "title": "QaToleranceCreate",
        "type": "object"
      },
      "QaToleranceOut": {
        "properties": {
          "counterparty_id": {
            "description": "The vendor it widens the check for.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor's name.",
            "title": "Counterparty Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who set it first.",
            "title": "Created By"
          },
          "id": {
            "description": "An id that starts with `qa_tol_`.",
            "examples": [
              "qa_tol_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "qa_tol"
          },
          "kind": {
            "description": "The check it widens: `unusual_amount`, `possible_repeat` or `missing_accrual`.",
            "enum": [
              "unusual_amount",
              "possible_repeat",
              "missing_accrual"
            ],
            "title": "Kind",
            "type": "string"
          },
          "multiplier": {
            "description": "How many times wider the check's threshold is for this vendor: 2 doubles it.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Multiplier",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why, as whoever set it wrote.",
            "title": "Note"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "counterparty_id",
          "multiplier",
          "created_at",
          "updated_at"
        ],
        "title": "QaToleranceOut",
        "type": "object"
      },
      "QaTolerancePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/QaToleranceOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "QaTolerancePage",
        "type": "object"
      },
      "QuestionOut": {
        "properties": {
          "about": {
            "title": "About",
            "type": "string"
          },
          "answer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answer"
          },
          "answered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At"
          },
          "asked_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asked By"
          },
          "asked_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asked By Email"
          },
          "asked_of": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asked Of"
          },
          "asked_of_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asked Of Email"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "filing_refused": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FilingRefusedOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only on the answer's own response: why the transaction was not filed, and no rule written, though the answer was kept. The code is the one filing or writing the rule alone is refused with (`account_not_usable` for a header or closed account, `rule_conflict`, `period_closed`, \u2026). Null when nothing was refused."
          },
          "id": {
            "description": "An id that starts with `qst_`.",
            "examples": [
              "qst_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "qst"
          },
          "rule_id": {
            "anyOf": [
              {
                "description": "An id that starts with `rule_`.",
                "examples": [
                  "rule_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "rule"
              },
              {
                "type": "null"
              }
            ],
            "description": "The rule its answer wrote (\"Do this every time\"), while that rule exists; null when the answer wrote none.",
            "title": "Rule Id"
          },
          "status": {
            "description": "`open`, `answered` or `closed`.",
            "title": "Status",
            "type": "string"
          },
          "subject_id": {
            "description": "An id. Which resource it names is given by the field beside it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          }
        },
        "required": [
          "id",
          "about",
          "subject_id",
          "asked_by",
          "asked_by_email",
          "asked_of",
          "asked_of_email",
          "body",
          "status",
          "answer",
          "answered_at",
          "closed_at",
          "created_at"
        ],
        "title": "QuestionOut",
        "type": "object"
      },
      "QuestionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/QuestionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "QuestionPage",
        "type": "object"
      },
      "QuickBooksOnlineStart": {
        "properties": {
          "connection_id": {
            "description": "The QuickBooks Online connection of these books to read.",
            "examples": [
              "conn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Connection Id",
            "type": "string",
            "x-id-prefix": "conn"
          },
          "cutover_date": {
            "description": "The last day the old books cover: every report is read as of it.",
            "format": "date",
            "title": "Cutover Date",
            "type": "string"
          }
        },
        "required": [
          "connection_id",
          "cutover_date"
        ],
        "title": "QuickBooksOnlineStart",
        "type": "object"
      },
      "RateChange": {
        "properties": {
          "rate": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "The corrected rate. Lines already posted keep the one they were booked at.",
            "title": "Rate"
          },
          "source": {
            "anyOf": [
              {
                "maxLength": 60,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          }
        },
        "required": [
          "rate"
        ],
        "title": "RateChange",
        "type": "object"
      },
      "RateCreate": {
        "properties": {
          "currency": {
            "description": "The foreign currency, ISO 4217: `EUR`.",
            "maxLength": 3,
            "minLength": 3,
            "title": "Currency",
            "type": "string"
          },
          "rate": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "One unit of the currency, in the books' currency.",
            "title": "Rate"
          },
          "rate_date": {
            "description": "The day the rate is for. It holds until a later one is set.",
            "format": "date",
            "title": "Rate Date",
            "type": "string"
          },
          "source": {
            "anyOf": [
              {
                "maxLength": 60,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the rate came from: `ECB`, `manual`.",
            "title": "Source"
          }
        },
        "required": [
          "currency",
          "rate_date",
          "rate"
        ],
        "title": "RateCreate",
        "type": "object"
      },
      "RateOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `fx_`.",
            "examples": [
              "fx_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "fx"
          },
          "rate": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Rate",
            "type": "string"
          },
          "rate_date": {
            "format": "date",
            "title": "Rate Date",
            "type": "string"
          },
          "row_version": {
            "title": "Row Version",
            "type": "integer"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "currency",
          "rate_date",
          "rate",
          "source",
          "created_at",
          "updated_at",
          "row_version"
        ],
        "title": "RateOut",
        "type": "object"
      },
      "RatePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/RateOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "RatePage",
        "type": "object"
      },
      "ReadLineOut": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the line comes to, as a plain number; null when not shown.",
            "title": "Amount"
          },
          "confidence": {
            "description": "How sure the reader was of the line, from 0 to 1.",
            "title": "Confidence",
            "type": "number"
          },
          "description": {
            "description": "What was billed on the line, as the bill words it.",
            "title": "Description",
            "type": "string"
          }
        },
        "required": [
          "description",
          "amount",
          "confidence"
        ],
        "title": "ReadLineOut",
        "type": "object"
      },
      "ReadinessAreaOut": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What is at stake, in the books' `currency`: the sum, unsigned, of the transactions behind the area's items, each counted once. `documents` is the spend still missing its receipt, `cards` the charges not approved at their source, `transactions` the undecided transactions and those with a blocking item open. Items that are not a transaction (a connection, an account off its statement, a bill to enter, a schedule, a question) add nothing, so `cash`, `payroll`, `revenue`, `receivables_payables`, `schedules` and `questions` are always null. A foreign transaction converts at the rate in force on the month's last day; null when one has no rate yet, or when `cards` also has a connection or account issue open, rather than a sum that leaves it out. Includes earlier months' open work, as the counts do. Null when ready or not applicable.",
            "title": "Amount"
          },
          "area": {
            "description": "`cash`, `cards`, `payroll`, `revenue`, `receivables_payables`, `schedules`, `documents`, `questions` or `transactions`.",
            "title": "Area",
            "type": "string"
          },
          "count": {
            "description": "How many items in it wait on a person: 0 when ready or not applicable.",
            "title": "Count",
            "type": "integer"
          },
          "inbox_items": {
            "description": "How many of `count` are items of the exception queue that wait on a person. The rest are connection problems, accounts off their statements, bills to enter, undecided transactions, and items the agent is still working. 0 when ready or not applicable.",
            "title": "Inbox Items",
            "type": "integer"
          },
          "inbox_owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whom the most pressing of those `inbox_items` waits on: `owner`, `reviewer` or `third_party`, in that order. Unlike `owner` it leaves connections out, and it is always the items' own `waiting_on`, with or without an accountant. Null when `inbox_items` is 0.",
            "title": "Inbox Owner"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the area falls to: `reviewer` (the accountant's work), `owner` (only the business owner can act: a sign-in, a question asked of them, an item escalated to them) or `third_party` (someone outside the books, such as a cardholder asked for a receipt). `payroll`, `revenue` and `documents` are whoever is most pressing among their connection and their items, in that order: owner, reviewer, third party. In books with no accountant and no accounting firm, the reviewer's work is `owner`. Null when not applicable.",
            "title": "Owner"
          },
          "state": {
            "description": "`ready` when nothing in it waits on anyone, `attention` when something does, `not_applicable` when the books have nothing of the kind (no payroll connection, no schedule).",
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "area",
          "state",
          "count",
          "owner",
          "inbox_items",
          "inbox_owner",
          "amount"
        ],
        "title": "ReadinessAreaOut",
        "type": "object"
      },
      "ReadinessBlockerOut": {
        "properties": {
          "count": {
            "description": "How many of it: transactions, months, tasks, reviews or exceptions.",
            "title": "Count",
            "type": "integer"
          },
          "kind": {
            "description": "What stands in the way of the close: `period_not_over`, `earlier_period_open`, `undecided_transactions`, `checklist_incomplete`, `accounts_unreviewed`, or an exception kind.",
            "title": "Kind",
            "type": "string"
          },
          "severity": {
            "description": "`warning` or `error`.",
            "title": "Severity",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "count",
          "severity"
        ],
        "title": "ReadinessBlockerOut",
        "type": "object"
      },
      "ReceiptEmailOut": {
        "description": "One email forwarded to the books' address, and what became of it.",
        "properties": {
          "documents_kept": {
            "description": "Receipts kept from it, once taken.",
            "title": "Documents Kept",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `rcpt_`.",
            "examples": [
              "rcpt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "rcpt"
          },
          "received_at": {
            "format": "date-time",
            "title": "Received At",
            "type": "string"
          },
          "refusal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why nothing was kept: `not_a_member` (the sender may not attach receipts to these books) or `nothing_attached` (no PDF or photo in it).",
            "title": "Refusal"
          },
          "sender": {
            "description": "Who sent it, as the email says.",
            "title": "Sender",
            "type": "string"
          },
          "status": {
            "description": "`pending` until taken, then `kept` or `refused`.",
            "title": "Status",
            "type": "string"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "taken_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Taken At"
          }
        },
        "required": [
          "id",
          "sender",
          "subject",
          "status",
          "refusal",
          "documents_kept",
          "received_at",
          "taken_at"
        ],
        "title": "ReceiptEmailOut",
        "type": "object"
      },
      "ReceiptEmailPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ReceiptEmailOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ReceiptEmailPage",
        "type": "object"
      },
      "ReceiptEvidenceOut": {
        "description": "A receipt the transaction has, with what was read off it checked\nagainst what the transaction records.",
        "properties": {
          "currency": {
            "description": "The receipt's currency against the transaction's: `agrees`, `differs`, or `unread` when the receipt does not show it clearly enough to compare.",
            "title": "Currency",
            "type": "string"
          },
          "date": {
            "description": "The receipt's date against the transaction's, within a week: `agrees`, `differs`, or `unread` when the receipt does not show it clearly enough to compare.",
            "title": "Date",
            "type": "string"
          },
          "difference": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The receipt's total less the transaction's amount, when they differ in the same currency; null otherwise.",
            "title": "Difference"
          },
          "document": {
            "$ref": "#/components/schemas/DocumentRecordOut"
          },
          "total": {
            "description": "The receipt's total against the amount: `agrees`, `differs`, or `unread` when the receipt does not show it clearly enough to compare.",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "document",
          "total",
          "date",
          "currency",
          "difference"
        ],
        "title": "ReceiptEvidenceOut",
        "type": "object"
      },
      "ReceiptInboxOut": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Forward receipts here. Null where this deployment does not receive email.",
            "title": "Address"
          }
        },
        "required": [
          "address"
        ],
        "title": "ReceiptInboxOut",
        "type": "object"
      },
      "ReceiptRequestCreate": {
        "properties": {
          "cardholder": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who to ask, when the card program does not say. Left out, the person it names.",
            "title": "Cardholder"
          },
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 3,
                "pattern": "^[^@\\s]+@[^@\\s]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where to send the link. Left out, the cardholder's address the books know: the one the card program gave, a member's of the same name, or one given before. Given for a cardholder the card program names, it is kept for that name.",
            "title": "Email"
          },
          "transaction_id": {
            "description": "The card charge. Asking again cancels its open request, and that link stops working.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Transaction Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "transaction_id"
        ],
        "title": "ReceiptRequestCreate",
        "type": "object"
      },
      "ReceiptRequestOut": {
        "properties": {
          "cancelled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelled At"
          },
          "cardholder": {
            "description": "Who it is asked of: the person who spent the charge.",
            "title": "Cardholder",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "document_id": {
            "anyOf": [
              {
                "description": "An id that starts with `doc_`.",
                "examples": [
                  "doc_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "doc"
              },
              {
                "type": "null"
              }
            ],
            "description": "The receipt the cardholder uploaded.",
            "title": "Document Id"
          },
          "emailed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "On a request just made or sent again: whether the email went. Null when read later.",
            "title": "Emailed"
          },
          "expired": {
            "description": "Open, but past its day: the sweep is about to expire it.",
            "title": "Expired",
            "type": "boolean"
          },
          "expired_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expired At"
          },
          "expires_at": {
            "description": "When its link stops working.",
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `rcpt_req_`.",
            "examples": [
              "rcpt_req_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "rcpt_req"
          },
          "reminded_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was last emailed again.",
            "title": "Reminded At"
          },
          "reminders_sent": {
            "description": "Reminders sent so far: on day 3 and day 7, at most two.",
            "title": "Reminders Sent",
            "type": "integer"
          },
          "requested_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who asked. Null when the books asked on their own, as the receipt went missing.",
            "title": "Requested By"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the first email went; null while it waits to go.",
            "title": "Sent At"
          },
          "sent_to": {
            "description": "The address the link is emailed to.",
            "title": "Sent To",
            "type": "string"
          },
          "status": {
            "description": "`open` until the cardholder uploads the receipt (`completed`), someone cancels it or asks again (`cancelled`), or its 30 days run out (`expired`).",
            "enum": [
              "open",
              "completed",
              "cancelled",
              "expired"
            ],
            "title": "Status",
            "type": "string"
          },
          "transaction_id": {
            "description": "The card charge whose receipt is asked for.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Transaction Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "id",
          "transaction_id",
          "cardholder",
          "sent_to",
          "status",
          "expired",
          "requested_by",
          "created_at",
          "sent_at",
          "expires_at",
          "reminded_at",
          "reminders_sent",
          "completed_at",
          "cancelled_at",
          "expired_at",
          "document_id"
        ],
        "title": "ReceiptRequestOut",
        "type": "object"
      },
      "ReceiptRequestPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ReceiptRequestOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ReceiptRequestPage",
        "type": "object"
      },
      "ReceiptRequestSettingsIn": {
        "properties": {
          "ask_automatically": {
            "description": "Ask cardholders on their own, or only when a person does.",
            "title": "Ask Automatically",
            "type": "boolean"
          }
        },
        "required": [
          "ask_automatically"
        ],
        "title": "ReceiptRequestSettingsIn",
        "type": "object"
      },
      "ReceiptRequestSettingsOut": {
        "properties": {
          "ask_automatically": {
            "description": "Whether a missing receipt is asked of its cardholder as soon as it is raised, when the books know their address. On by default.",
            "title": "Ask Automatically",
            "type": "boolean"
          }
        },
        "required": [
          "ask_automatically"
        ],
        "title": "ReceiptRequestSettingsOut",
        "type": "object"
      },
      "ReceiptSearchMailboxOut": {
        "description": "One mailbox, and what its searches for a transaction's receipt came to.",
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The mailbox's address, when the provider told it.",
            "title": "Address"
          },
          "connection_id": {
            "description": "An id that starts with `conn_`.",
            "examples": [
              "conn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Connection Id",
            "type": "string",
            "x-id-prefix": "conn"
          },
          "found": {
            "description": "Whether a search found the receipt in it.",
            "title": "Found",
            "type": "boolean"
          },
          "provider": {
            "$ref": "#/components/schemas/MailProvider"
          },
          "searched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was last searched for this transaction's receipt; null if never.",
            "title": "Searched At"
          },
          "searching": {
            "description": "Whether a search a person asked for is running in it now.",
            "title": "Searching",
            "type": "boolean"
          }
        },
        "required": [
          "connection_id",
          "provider",
          "address",
          "searching",
          "searched_at",
          "found"
        ],
        "title": "ReceiptSearchMailboxOut",
        "type": "object"
      },
      "ReceiptSearchOut": {
        "description": "A transaction's receipt, looked for in the books' connected mailboxes.",
        "properties": {
          "mailboxes": {
            "description": "Each mailbox that can be searched. Empty: no mailbox is connected, or each is paused or disconnected.",
            "items": {
              "$ref": "#/components/schemas/ReceiptSearchMailboxOut"
            },
            "title": "Mailboxes",
            "type": "array"
          },
          "searching": {
            "description": "Whether a search is running in any mailbox. Read again until it is false; a receipt found is then among the transaction's documents.",
            "title": "Searching",
            "type": "boolean"
          },
          "transaction_id": {
            "description": "An id that starts with `txn_`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Transaction Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "transaction_id",
          "searching",
          "mailboxes"
        ],
        "title": "ReceiptSearchOut",
        "type": "object"
      },
      "ReceiptSuggestionOut": {
        "description": "A receipt no transaction has claimed that might be this one's.",
        "properties": {
          "document": {
            "$ref": "#/components/schemas/DocumentRecordOut"
          },
          "reasons": {
            "description": "Why it is suggested, strongest first: `amount` (the same total), `merchant` (the merchant's name matches) and `date` (dated within a week).",
            "items": {
              "type": "string"
            },
            "title": "Reasons",
            "type": "array"
          }
        },
        "required": [
          "document",
          "reasons"
        ],
        "title": "ReceiptSuggestionOut",
        "type": "object"
      },
      "RecommendationOut": {
        "description": "What the books would file an item's transaction as.",
        "properties": {
          "account_code": {
            "description": "Its code, such as `6100`.",
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "The GL account recommended.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "description": "Its name.",
            "title": "Account Name",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "0 to 1: the model's confidence, or the share of the payee's earlier filings that went to this account. Null when nothing measures it.",
            "title": "Confidence"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the transaction is with, when the source said.",
            "title": "Counterparty Id"
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their name.",
            "title": "Counterparty Name"
          },
          "department_id": {
            "anyOf": [
              {
                "description": "An id that starts with `dimv_`.",
                "examples": [
                  "dimv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "dimv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The department proposed: a value of the department dimension.",
            "title": "Department Id"
          },
          "department_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That department's name.",
            "title": "Department Name"
          },
          "evidence": {
            "description": "What the books found when they researched the item: the payee's earlier filings, its default account, rules that nearly matched, the receipt, similar transactions. Empty until it is researched.",
            "items": {
              "$ref": "#/components/schemas/EvidenceOut"
            },
            "title": "Evidence",
            "type": "array"
          },
          "proposal_id": {
            "anyOf": [
              {
                "description": "An id that starts with `prop_`.",
                "examples": [
                  "prop_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "prop"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model proposal the research made, with everything it was shown (`GET /model-proposals/{id}`). Null when no model was asked.",
            "title": "Proposal Id"
          },
          "reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One line on why.",
            "title": "Reasoning"
          },
          "source": {
            "description": "Where it came from: `rule`, `model`, or `history` (the payee's earlier filings, or its default account).",
            "enum": [
              "rule",
              "model",
              "history"
            ],
            "title": "Source",
            "type": "string"
          },
          "spread": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SpreadOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The prepaid spread proposed, when the payment buys more than a month."
          },
          "times_filed": {
            "default": 0,
            "description": "How many of the payee's earlier transactions were filed here.",
            "title": "Times Filed",
            "type": "integer"
          }
        },
        "required": [
          "account_id",
          "account_code",
          "account_name",
          "source"
        ],
        "title": "RecommendationOut",
        "type": "object"
      },
      "ReconcileRequest": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "include_descendants": {
            "default": false,
            "title": "Include Descendants",
            "type": "boolean"
          },
          "statement_balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Statement Balance"
          }
        },
        "required": [
          "account_id",
          "as_of",
          "statement_balance"
        ],
        "title": "ReconcileRequest",
        "type": "object"
      },
      "ReconcileResponse": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "difference": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "is_balanced": {
            "title": "Is Balanced",
            "type": "boolean"
          },
          "ledger_balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Ledger Balance",
            "type": "string"
          },
          "statement_balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Statement Balance",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "as_of",
          "statement_balance",
          "ledger_balance",
          "difference",
          "is_balanced"
        ],
        "title": "ReconcileResponse",
        "type": "object"
      },
      "ReconciliationMatchCreate": {
        "properties": {
          "explanation": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why these are the same money.",
            "title": "Explanation"
          },
          "journal_line_ids": {
            "description": "Lines posted to the statement's account.",
            "items": {
              "description": "An id that starts with `jel_`.",
              "examples": [
                "jel_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "jel"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Journal Line Ids",
            "type": "array"
          },
          "statement_id": {
            "description": "An id that starts with `stmt_`.",
            "examples": [
              "stmt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Statement Id",
            "type": "string",
            "x-id-prefix": "stmt"
          },
          "statement_line_ids": {
            "items": {
              "description": "An id that starts with `stl_`.",
              "examples": [
                "stl_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "stl"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Statement Line Ids",
            "type": "array"
          }
        },
        "required": [
          "statement_id",
          "statement_line_ids",
          "journal_line_ids"
        ],
        "title": "ReconciliationMatchCreate",
        "type": "object"
      },
      "ReconciliationMatchOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "explanation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explanation"
          },
          "id": {
            "description": "An id that starts with `match_`.",
            "examples": [
              "match_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "match"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/MatchItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "method": {
            "description": "`feed`, `amount`, `batched`, `split` or `manual`.",
            "title": "Method",
            "type": "string"
          },
          "statement_id": {
            "description": "An id that starts with `stmt_`.",
            "examples": [
              "stmt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Statement Id",
            "type": "string",
            "x-id-prefix": "stmt"
          },
          "status": {
            "description": "`matched`, or `undone`.",
            "title": "Status",
            "type": "string"
          },
          "undone_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Undone At"
          }
        },
        "required": [
          "id",
          "statement_id",
          "account_id",
          "status",
          "method",
          "explanation",
          "created_by",
          "created_at",
          "undone_at",
          "items"
        ],
        "title": "ReconciliationMatchOut",
        "type": "object"
      },
      "ReconciliationMatchPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ReconciliationMatchOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ReconciliationMatchPage",
        "type": "object"
      },
      "ReconciliationOut": {
        "description": "One time an account was compared against a statement, and what it found.",
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "as_of": {
            "description": "The date the statement balance is as of.",
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "by_person": {
            "description": "True when a person entered the statement balance; false when a month's close compared against the balance a connected source reported.",
            "title": "By Person",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "difference": {
            "description": "Statement less ledger; zero when they agree.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `recon_`.",
            "examples": [
              "recon_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "recon"
          },
          "includes_descendants": {
            "description": "Whether the comparison covered the account and every account under it.",
            "title": "Includes Descendants",
            "type": "boolean"
          },
          "is_balanced": {
            "title": "Is Balanced",
            "type": "boolean"
          },
          "ledger_balance": {
            "description": "What the ledger held on that date.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Ledger Balance",
            "type": "string"
          },
          "statement_balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Statement Balance",
            "type": "string"
          }
        },
        "required": [
          "id",
          "account_id",
          "account_code",
          "account_name",
          "as_of",
          "statement_balance",
          "ledger_balance",
          "difference",
          "is_balanced",
          "includes_descendants",
          "by_person",
          "created_at"
        ],
        "title": "ReconciliationOut",
        "type": "object"
      },
      "ReconciliationPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ReconciliationOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ReconciliationPage",
        "type": "object"
      },
      "ReferralOut": {
        "description": "Who the organization came to LedgerIt through (decision 0130).",
        "properties": {
          "partner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The partner's name; null if LedgerIt no longer lists the partner.",
            "title": "Partner Name"
          },
          "program": {
            "description": "`fund`, `accelerator` or `firm`.",
            "enum": [
              "fund",
              "accelerator",
              "firm"
            ],
            "title": "Program",
            "type": "string"
          }
        },
        "required": [
          "program",
          "partner_name"
        ],
        "title": "ReferralOut",
        "type": "object"
      },
      "RegisterLineOut": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/AccountRef"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Balance",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "direction": {
            "enum": [
              "debit",
              "credit"
            ],
            "title": "Direction",
            "type": "string"
          },
          "entry_date": {
            "format": "date",
            "title": "Entry Date",
            "type": "string"
          },
          "entry_id": {
            "description": "An id that starts with `je_`.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "entry_no": {
            "title": "Entry No",
            "type": "integer"
          },
          "line_id": {
            "description": "An id that starts with `jel_`.",
            "examples": [
              "jel_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Line Id",
            "type": "string",
            "x-id-prefix": "jel"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "reverses_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the line's entry is a reversal: the entry it undoes. A reader can fold the pair into one line when both are in the window.",
            "title": "Reverses Entry Id"
          },
          "signed_amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Signed Amount",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "line_id",
          "entry_id",
          "entry_no",
          "entry_date",
          "description",
          "memo",
          "source",
          "account",
          "direction",
          "amount",
          "signed_amount",
          "balance"
        ],
        "title": "RegisterLineOut",
        "type": "object"
      },
      "RegisterOut": {
        "properties": {
          "closing_balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Closing Balance",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/RegisterLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "opening_balance": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Opening Balance",
            "type": "string"
          },
          "since": {
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          },
          "until": {
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "since",
          "until",
          "opening_balance",
          "lines",
          "closing_balance",
          "truncated"
        ],
        "title": "RegisterOut",
        "type": "object"
      },
      "RelatedOut": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref"
          },
          "role": {
            "description": "How the record relates to the work.",
            "enum": [
              "transaction",
              "entry",
              "account",
              "period"
            ],
            "title": "Role",
            "type": "string"
          },
          "subject_id": {
            "description": "The record's id, prefixed for its kind; a month's is its `YYYY-MM`.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Subject Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "subject_type": {
            "title": "Subject Type",
            "type": "string"
          }
        },
        "required": [
          "role",
          "subject_type",
          "subject_id"
        ],
        "title": "RelatedOut",
        "type": "object"
      },
      "ReleaseIn": {
        "properties": {
          "released_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "With no charge, the day it stopped being owed (say, the bill was entered elsewhere). Today if left out.",
            "title": "Released On"
          },
          "transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The charge that settles it: an expense in the books, filed to the accrual's account. Its day is the release day.",
            "title": "Transaction Id"
          }
        },
        "title": "ReleaseIn",
        "type": "object"
      },
      "Reopen": {
        "properties": {
          "post": {
            "default": false,
            "description": "Undo a person's filing rather than ask for review: when the decision that stood before it is one the books post on their own (a rule's, or a model proposal that cleared every gate), post it again as that decision. Otherwise ignored.",
            "title": "Post",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it goes back, for the trail. Optional: undoing a misclick needs no essay.",
            "title": "Reason"
          }
        },
        "title": "Reopen",
        "type": "object"
      },
      "ReopenRequest": {
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "ReopenRequest",
        "type": "object"
      },
      "ReopeningOut": {
        "properties": {
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "reopened_at": {
            "format": "date-time",
            "title": "Reopened At",
            "type": "string"
          },
          "reopened_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reopened By"
          }
        },
        "required": [
          "reason",
          "reopened_by",
          "reopened_at"
        ],
        "title": "ReopeningOut",
        "type": "object"
      },
      "ReplacementOut": {
        "properties": {
          "replacement": {
            "$ref": "#/components/schemas/EntryOut"
          },
          "reversal": {
            "$ref": "#/components/schemas/EntryOut"
          }
        },
        "required": [
          "replacement",
          "reversal"
        ],
        "title": "ReplacementOut",
        "type": "object"
      },
      "ReplacementRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Defaults to the original's.",
            "title": "Description"
          },
          "entry_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Defaults to the original's date.",
            "title": "Entry Date"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/NewLine"
            },
            "minItems": 2,
            "title": "Lines",
            "type": "array"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Defaults to the original's. An empty string clears it.",
            "title": "Memo"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason",
          "lines"
        ],
        "title": "ReplacementRequest",
        "type": "object"
      },
      "ReportRunCreate": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For the trial balance and the balance sheet: the day. Defaults to today.",
            "title": "As Of"
          },
          "report": {
            "description": "`trial_balance`, `balance_sheet`, `income_statement` or `cash_flow`. A board pack's figures are kept by its close.",
            "enum": [
              "trial_balance",
              "balance_sheet",
              "income_statement",
              "cash_flow"
            ],
            "title": "Report",
            "type": "string"
          },
          "since": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For the income statement and the cash flow statement: the first day. Defaults to this month's first.",
            "title": "Since"
          },
          "until": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "For the income statement and the cash flow statement: the last day. Defaults to today.",
            "title": "Until"
          }
        },
        "required": [
          "report"
        ],
        "title": "ReportRunCreate",
        "type": "object"
      },
      "ReportRunOut": {
        "description": "A kept report's manifest.",
        "properties": {
          "artifact_hash": {
            "description": "The sha256 of what the report said.",
            "title": "Artifact Hash",
            "type": "string"
          },
          "close_run_id": {
            "anyOf": [
              {
                "description": "An id that starts with `close_run_`.",
                "examples": [
                  "close_run_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "close_run"
              },
              {
                "type": "null"
              }
            ],
            "description": "The close run that kept it when its month closed; null for a report kept by hand.",
            "title": "Close Run Id"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who kept it; null once they have left.",
            "title": "Created By"
          },
          "definition_version": {
            "description": "The version of the report's definition it was made under.",
            "title": "Definition Version",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `rpt_run_`.",
            "examples": [
              "rpt_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "rpt_run"
          },
          "parameters": {
            "additionalProperties": true,
            "description": "What it was asked for.",
            "title": "Parameters",
            "type": "object"
          },
          "period": {
            "description": "The day (`2026-09-30`), or the window (`2026-01-01..2026-09-30`).",
            "title": "Period",
            "type": "string"
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          },
          "report": {
            "enum": [
              "trial_balance",
              "balance_sheet",
              "income_statement",
              "cash_flow",
              "board_pack"
            ],
            "title": "Report",
            "type": "string"
          },
          "through_sequence": {
            "description": "The books were read as posted through this sequence, and no further.",
            "title": "Through Sequence",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "report",
          "definition_version",
          "period",
          "through_sequence",
          "parameters",
          "close_run_id",
          "artifact_hash",
          "created_by",
          "recorded_at"
        ],
        "title": "ReportRunOut",
        "type": "object"
      },
      "ReportRunPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ReportRunOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ReportRunPage",
        "type": "object"
      },
      "ReportRunWithReportOut": {
        "description": "A run with the report it keeps, produced again from its manifest.",
        "properties": {
          "artifact_hash": {
            "description": "The sha256 of what the report said.",
            "title": "Artifact Hash",
            "type": "string"
          },
          "balance_sheet": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BalanceSheetOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "board_pack": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BoardPackFiguresOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "cash_flow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CashFlowStatementOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "close_run_id": {
            "anyOf": [
              {
                "description": "An id that starts with `close_run_`.",
                "examples": [
                  "close_run_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "close_run"
              },
              {
                "type": "null"
              }
            ],
            "description": "The close run that kept it when its month closed; null for a report kept by hand.",
            "title": "Close Run Id"
          },
          "created_by": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who kept it; null once they have left.",
            "title": "Created By"
          },
          "definition_version": {
            "description": "The version of the report's definition it was made under.",
            "title": "Definition Version",
            "type": "integer"
          },
          "id": {
            "description": "An id that starts with `rpt_run_`.",
            "examples": [
              "rpt_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "rpt_run"
          },
          "income_statement": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IncomeStatementOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "parameters": {
            "additionalProperties": true,
            "description": "What it was asked for.",
            "title": "Parameters",
            "type": "object"
          },
          "period": {
            "description": "The day (`2026-09-30`), or the window (`2026-01-01..2026-09-30`).",
            "title": "Period",
            "type": "string"
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          },
          "report": {
            "enum": [
              "trial_balance",
              "balance_sheet",
              "income_statement",
              "cash_flow",
              "board_pack"
            ],
            "title": "Report",
            "type": "string"
          },
          "reproduced_hash": {
            "description": "The sha256 of the report as produced now from the manifest.",
            "title": "Reproduced Hash",
            "type": "string"
          },
          "reproduces": {
            "description": "True when its figures are exactly what they were when it was kept. Since definition version 2 an account renamed in between does not count against it.",
            "title": "Reproduces",
            "type": "boolean"
          },
          "through_sequence": {
            "description": "The books were read as posted through this sequence, and no further.",
            "title": "Through Sequence",
            "type": "integer"
          },
          "trial_balance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialBalanceOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "report",
          "definition_version",
          "period",
          "through_sequence",
          "parameters",
          "close_run_id",
          "artifact_hash",
          "created_by",
          "recorded_at",
          "reproduced_hash",
          "reproduces"
        ],
        "title": "ReportRunWithReportOut",
        "type": "object"
      },
      "RequiredDimensionsIn": {
        "properties": {
          "dimension_ids": {
            "description": "The whole set: dimensions left out stop being required.",
            "items": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "dim"
            },
            "maxItems": 20,
            "title": "Dimension Ids",
            "type": "array"
          }
        },
        "required": [
          "dimension_ids"
        ],
        "title": "RequiredDimensionsIn",
        "type": "object"
      },
      "RequiredDimensionsOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "dimension_ids": {
            "description": "Every line posted to the account names a value of each of these dimensions.",
            "items": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "type": "string",
              "x-id-prefix": "dim"
            },
            "title": "Dimension Ids",
            "type": "array"
          }
        },
        "required": [
          "account_id",
          "dimension_ids"
        ],
        "title": "RequiredDimensionsOut",
        "type": "object"
      },
      "ResolveException": {
        "properties": {
          "dismiss": {
            "default": false,
            "title": "Dismiss",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What was done, or why nothing was. Required unless a dismissal gives a `reason`.",
            "title": "Note"
          },
          "reason": {
            "anyOf": [
              {
                "enum": [
                  "vendor_varies",
                  "expected"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why an item the books' daily check raised is dismissed: `vendor_varies` widens that check for its vendor, so the same pattern is not raised again; `expected` only dismisses it. Only with `dismiss`.",
            "title": "Reason"
          }
        },
        "title": "ResolveException",
        "type": "object"
      },
      "RestoreOut": {
        "properties": {
          "accounts_created": {
            "description": "Accounts the archive had and these books did not.",
            "title": "Accounts Created",
            "type": "integer"
          },
          "as_of": {
            "description": "The day the trial balance was compared on: the archive's last entry's.",
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "counterparties_created": {
            "title": "Counterparties Created",
            "type": "integer"
          },
          "dimensions_created": {
            "title": "Dimensions Created",
            "type": "integer"
          },
          "entries": {
            "description": "Entries written, reversals and replacements included.",
            "title": "Entries",
            "type": "integer"
          },
          "lines": {
            "title": "Lines",
            "type": "integer"
          },
          "total_credits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Credits",
            "type": "string"
          },
          "total_debits": {
            "description": "The restored trial balance's debits, equal to the archive's.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Debits",
            "type": "string"
          }
        },
        "required": [
          "entries",
          "lines",
          "accounts_created",
          "dimensions_created",
          "counterparties_created",
          "as_of",
          "total_debits",
          "total_credits"
        ],
        "title": "RestoreOut",
        "type": "object"
      },
      "RevaluationOut": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/RevaluedOut"
            },
            "title": "Accounts",
            "type": "array"
          },
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The revaluation entry posted, or null when nothing had moved.",
            "title": "Entry Id"
          }
        },
        "required": [
          "as_of",
          "entry_id",
          "accounts"
        ],
        "title": "RevaluationOut",
        "type": "object"
      },
      "RevaluationRequest": {
        "properties": {
          "as_of": {
            "description": "The closing date: balances and rates as of it.",
            "format": "date",
            "title": "As Of",
            "type": "string"
          }
        },
        "required": [
          "as_of"
        ],
        "title": "RevaluationRequest",
        "type": "object"
      },
      "RevaluedOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "carrying": {
            "description": "What its lines add up to in the books' currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Carrying",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "difference": {
            "description": "Revalued less carrying: the gain (positive) or loss to post.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "foreign_balance": {
            "description": "What the account holds in the currency; negative for a credit balance.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Foreign Balance",
            "type": "string"
          },
          "rate": {
            "description": "The rate in force on the day.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Rate",
            "type": "string"
          },
          "revalued": {
            "description": "The foreign balance at the rate.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revalued",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "currency",
          "foreign_balance",
          "rate",
          "carrying",
          "revalued",
          "difference"
        ],
        "title": "RevaluedOut",
        "type": "object"
      },
      "ReversalRequest": {
        "properties": {
          "entry_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Date"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "ReversalRequest",
        "type": "object"
      },
      "ReviewSummary": {
        "properties": {
          "approved": {
            "description": "How many of the model's decisions a person kept.",
            "title": "Approved",
            "type": "integer"
          },
          "corrected": {
            "description": "How many a person changed.",
            "title": "Corrected",
            "type": "integer"
          },
          "reviewers": {
            "description": "Who reviewed them.",
            "items": {
              "$ref": "#/components/schemas/ContributorOut"
            },
            "title": "Reviewers",
            "type": "array"
          }
        },
        "required": [
          "approved",
          "corrected",
          "reviewers"
        ],
        "title": "ReviewSummary",
        "type": "object"
      },
      "RuleChanges": {
        "description": "Only the fields sent change. The narrowing fields (`account_id`,\n`event_type`, `amount_min`, `amount_max`) are cleared by sending null;\nthe rest cannot be: they are typed without null, and default to None only\nso that leaving one out means \"unchanged\" (hence the ignores).",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "amount_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Max"
          },
          "amount_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Min"
          },
          "category_account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "dimensions": {
            "description": "Every value a matching transaction is to name; the ones left out are taken off, and an empty list clears them. Transactions it already filed keep theirs; `POST /rules/{rule_id}/unnamed/name` gives them the rule's values.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          },
          "document_kind": {
            "anyOf": [
              {
                "enum": [
                  "invoice",
                  "receipt",
                  "none"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only transactions with this paper behind them: an `invoice` or a `receipt` linked as evidence, or `none` for one with no paper at all. Null when the rule does not care.",
            "title": "Document Kind"
          },
          "event_type": {
            "anyOf": [
              {
                "enum": [
                  "expense",
                  "income",
                  "transfer",
                  "fee",
                  "interest",
                  "refund",
                  "sales_refund"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "match_on": {
            "enum": [
              "description",
              "source_description",
              "counterparty"
            ],
            "title": "Match On",
            "type": "string"
          },
          "match_type": {
            "enum": [
              "contains",
              "equals",
              "starts_with"
            ],
            "title": "Match Type",
            "type": "string"
          },
          "memo_pattern": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only transactions whose memo \u2014 the description the ledger shows, or the line the bank printed \u2014 holds these words. Compared as `pattern` is: case-insensitively, processor noise removed. Null when the rule does not look at the memo.",
            "title": "Memo Pattern"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "pattern": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Pattern",
            "type": "string"
          },
          "priority": {
            "maximum": 1000.0,
            "minimum": -1000.0,
            "title": "Priority",
            "type": "integer"
          }
        },
        "title": "RuleChanges",
        "type": "object"
      },
      "RuleNamedOut": {
        "properties": {
          "named": {
            "description": "Transactions given the rule's values by this request.",
            "title": "Named",
            "type": "integer"
          },
          "refused": {
            "description": "Transactions left as they were because posting them again was refused: an account each is filed to now requires a value neither it nor the rule names.",
            "title": "Refused",
            "type": "integer"
          },
          "unnamed": {
            "$ref": "#/components/schemas/RuleUnnamedOut",
            "description": "What is still unnamed afterwards. `to_name` is above zero when there were more than 200 to name: send the request again."
          }
        },
        "required": [
          "named",
          "refused",
          "unnamed"
        ],
        "title": "RuleNamedOut",
        "type": "object"
      },
      "RuleOut": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "amount_max": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Max"
          },
          "amount_min": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Min"
          },
          "category_account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "category_code": {
            "title": "Category Code",
            "type": "string"
          },
          "category_name": {
            "title": "Category Name",
            "type": "string"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "dimensions": {
            "description": "The department, and the value of any other dimension, a matching transaction names: each one it does not already name, so its lines to `category_account_id` carry it. A learned rule takes them once three of its merchant's transactions name the same values. Empty when the rule names none.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "document_kind": {
            "anyOf": [
              {
                "enum": [
                  "invoice",
                  "receipt",
                  "none"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only transactions with this paper behind them: an `invoice` or a `receipt` linked as evidence, or `none` for one with no paper at all. Null when the rule does not care.",
            "title": "Document Kind"
          },
          "event_type": {
            "anyOf": [
              {
                "enum": [
                  "expense",
                  "income",
                  "transfer",
                  "fee",
                  "interest",
                  "refund",
                  "sales_refund"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type"
          },
          "id": {
            "description": "An id that starts with `rule_`.",
            "examples": [
              "rule_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "rule"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_applied_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Applied At"
          },
          "match_on": {
            "enum": [
              "description",
              "source_description",
              "counterparty"
            ],
            "title": "Match On",
            "type": "string"
          },
          "match_type": {
            "enum": [
              "contains",
              "equals",
              "starts_with"
            ],
            "title": "Match Type",
            "type": "string"
          },
          "memo_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only transactions whose memo \u2014 the description the ledger shows, or the line the bank printed \u2014 holds these words. Compared as `pattern` is: case-insensitively, processor noise removed. Null when the rule does not look at the memo.",
            "title": "Memo Pattern"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "origin": {
            "description": "`manual`: a person wrote it. `learned`: the product wrote it from three consistent human decisions about one merchant. `answer`: written from a person's answer to a question, when they asked for it to be done every time.",
            "enum": [
              "manual",
              "learned",
              "answer"
            ],
            "title": "Origin",
            "type": "string"
          },
          "pattern": {
            "title": "Pattern",
            "type": "string"
          },
          "priority": {
            "title": "Priority",
            "type": "integer"
          },
          "source_question_id": {
            "anyOf": [
              {
                "description": "An id that starts with `qst_`.",
                "examples": [
                  "qst_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "qst"
              },
              {
                "type": "null"
              }
            ],
            "description": "The question whose answer wrote it (`origin: answer`); null once that question is deleted \u2014 the rule outlives the conversation.",
            "title": "Source Question Id"
          },
          "source_transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction that question is about, whose page holds the conversation; null with `source_question_id`.",
            "title": "Source Transaction Id"
          },
          "times_applied": {
            "title": "Times Applied",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "match_on",
          "match_type",
          "pattern",
          "account_id",
          "event_type",
          "amount_min",
          "amount_max",
          "category_account_id",
          "category_code",
          "category_name",
          "origin",
          "priority",
          "is_active",
          "times_applied",
          "last_applied_at",
          "created_at"
        ],
        "title": "RuleOut",
        "type": "object"
      },
      "RulePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/RuleOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "RulePage",
        "type": "object"
      },
      "RulePreviewMatch": {
        "properties": {
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "category_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where it is filed today; a saved rule would not move it.",
            "title": "Category Account Id"
          },
          "category_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Name"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "event_date": {
            "format": "date",
            "title": "Event Date",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `txn_`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "txn"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "description",
          "event_date",
          "amount",
          "currency",
          "event_type",
          "category_account_id",
          "status"
        ],
        "title": "RulePreviewMatch",
        "type": "object"
      },
      "RulePreviewOut": {
        "properties": {
          "matched": {
            "description": "How many of the transactions looked at the terms match.",
            "title": "Matched",
            "type": "integer"
          },
          "sample": {
            "description": "The newest matches.",
            "items": {
              "$ref": "#/components/schemas/RulePreviewMatch"
            },
            "title": "Sample",
            "type": "array"
          },
          "scanned": {
            "description": "How many transactions were looked at, newest first.",
            "title": "Scanned",
            "type": "integer"
          },
          "truncated": {
            "description": "True when the books hold more transactions than were looked at.",
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "matched",
          "scanned",
          "truncated",
          "sample"
        ],
        "title": "RulePreviewOut",
        "type": "object"
      },
      "RuleUnnamedOut": {
        "properties": {
          "locked": {
            "description": "Ones in the books in a locked month: left as they are, since naming them would change a closed month. Reopen the month to include them.",
            "title": "Locked",
            "type": "integer"
          },
          "locked_months": {
            "description": "The first day of each month those are in, oldest first.",
            "items": {
              "format": "date",
              "type": "string"
            },
            "title": "Locked Months",
            "type": "array"
          },
          "spread": {
            "description": "Ones spread over months by a schedule, which takes each month's share out with the values the transaction names: left as they are.",
            "title": "Spread",
            "type": "integer"
          },
          "to_name": {
            "description": "Transactions the rule filed, whose filing still stands, that do not name a dimension the rule names and can be given its values now (`POST /rules/{rule_id}/unnamed/name`). Zero when the rule names no dimension values.",
            "title": "To Name",
            "type": "integer"
          }
        },
        "required": [
          "to_name",
          "locked",
          "locked_months",
          "spread"
        ],
        "title": "RuleUnnamedOut",
        "type": "object"
      },
      "SbcExpenseRunOut": {
        "properties": {
          "amount": {
            "description": "The month's stock-based compensation, net.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "by_department": {
            "description": "The amount split by department.",
            "items": {
              "$ref": "#/components/schemas/DepartmentAmountOut"
            },
            "title": "By Department",
            "type": "array"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "entry_id": {
            "description": "The entry that posted it.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entry Id",
            "type": "string",
            "x-id-prefix": "je"
          },
          "id": {
            "description": "An id that starts with `sbc_run_`.",
            "examples": [
              "sbc_run_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "sbc_run"
          },
          "period_ends_on": {
            "description": "The month it expensed, by its last day.",
            "format": "date",
            "title": "Period Ends On",
            "type": "string"
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          },
          "reversed": {
            "description": "Whether that entry was reversed; the next close expenses it again.",
            "title": "Reversed",
            "type": "boolean"
          },
          "version": {
            "description": "1, or more when the month was closed again and something had changed.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "period_ends_on",
          "version",
          "amount",
          "currency",
          "by_department",
          "entry_id",
          "reversed",
          "recorded_at"
        ],
        "title": "SbcExpenseRunOut",
        "type": "object"
      },
      "SbcExpenseRunPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SbcExpenseRunOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "SbcExpenseRunPage",
        "type": "object"
      },
      "ScheduleChange": {
        "description": "Only what is sent changes.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "dimensions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/LineDimensionIn"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exactly the values its close entries are to carry, at most one per dimension; an empty list names none. Refused with `schedule_in_use` once a close has posted from it, and with `schedule_not_editable` for a spread schedule, which carries its transaction's.",
            "title": "Dimensions"
          },
          "ends_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An earlier day takes the rest in at the next close.",
            "title": "Ends On"
          },
          "method": {
            "anyOf": [
              {
                "enum": [
                  "daily",
                  "monthly"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Method"
          },
          "starts_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts On"
          },
          "total": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An accrual's estimate. The next close posts the difference.",
            "title": "Total"
          }
        },
        "title": "ScheduleChange",
        "type": "object"
      },
      "ScheduleDetailOut": {
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "The income or expense account it reaches month by month.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Id"
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "dimensions": {
            "description": "The department, and the value of any other dimension, carried on both lines of every entry a close posts from it, an accrual's release included. A spread schedule's are its transaction's.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "editable": {
            "description": "Whether it can be changed, paused or deleted here. A provider's follows its invoice.",
            "title": "Editable",
            "type": "boolean"
          },
          "ends_on": {
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "holding_account_code": {
            "title": "Holding Account Code",
            "type": "string"
          },
          "holding_account_id": {
            "description": "Where the part not yet used or earned waits: prepaid expenses, deferred revenue, accumulated depreciation; for an accrual, accrued liabilities.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Holding Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "holding_account_name": {
            "title": "Holding Account Name",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `sched_`.",
            "examples": [
              "sched_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "sched"
          },
          "kind": {
            "description": "`prepaid`: paid for something used over months. `revenue`: received for something earned over months. `depreciation`: equipment used up over years. `accrual`: a cost used in one month and paid in a later one.",
            "enum": [
              "revenue",
              "prepaid",
              "depreciation",
              "accrual"
            ],
            "title": "Kind",
            "type": "string"
          },
          "method": {
            "description": "`monthly`: the same share each calendar month. `daily`: by the days of each month it covers.",
            "enum": [
              "daily",
              "monthly"
            ],
            "title": "Method",
            "type": "string"
          },
          "months": {
            "description": "Every month it covers, oldest first.",
            "items": {
              "$ref": "#/components/schemas/ScheduleMonthOut"
            },
            "title": "Months",
            "type": "array"
          },
          "paused_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day a person paused it; null while it runs. No close posts from a paused schedule. Resumed, the next close catches up the months it skipped.",
            "title": "Paused On"
          },
          "recognized": {
            "description": "What the closes have taken into the P&L so far. For an accrual, what waits in accrued liabilities: the estimate once its month's close has posted, nothing once it is released.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Recognized",
            "type": "string"
          },
          "release_transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "An accrual: the charge that settled it, when one did.",
            "title": "Release Transaction Id"
          },
          "released_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An accrual: the day its cost reached the books, or stopped being owed. The close of that month takes the estimate back out. Null while it waits.",
            "title": "Released On"
          },
          "remaining": {
            "description": "What is still to come: `total` less `recognized`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Remaining",
            "type": "string"
          },
          "settles_from": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An accrual: the first day a charge from its vendor, filed to its account, settles it. The day after its month for a cost billed later; its month's first day for one approved from the books' daily check, standing in for a charge the month has not had yet. Null for other schedules.",
            "title": "Settles From"
          },
          "source": {
            "description": "Who keeps it: `transaction` (a person spread one), `manual`, or the provider whose invoice it follows, such as `stripe`.",
            "title": "Source",
            "type": "string"
          },
          "starts_on": {
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "status": {
            "description": "`active` while it has something to move, `complete` once it has moved everything, `cancelled` when stopped early.",
            "enum": [
              "active",
              "complete",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "total": {
            "description": "The whole amount spread; for an accrual, the estimate.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction it spreads, when it spreads one.",
            "title": "Transaction Id"
          }
        },
        "required": [
          "id",
          "kind",
          "source",
          "description",
          "transaction_id",
          "counterparty_id",
          "counterparty_name",
          "account_id",
          "account_code",
          "account_name",
          "holding_account_id",
          "holding_account_code",
          "holding_account_name",
          "total",
          "recognized",
          "remaining",
          "currency",
          "starts_on",
          "ends_on",
          "method",
          "status",
          "editable",
          "released_on",
          "release_transaction_id",
          "created_at",
          "months"
        ],
        "title": "ScheduleDetailOut",
        "type": "object"
      },
      "ScheduleMonthOut": {
        "properties": {
          "amount": {
            "description": "What reaches the P&L in this month: used, or earned.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "ends_on": {
            "description": "The month's last day.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "journal_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The close's entry that took it into the books; null while still to come.",
            "title": "Journal Entry Id"
          },
          "recognized_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last day of the month whose close took it in: a later month when it was spread after its own month closed.",
            "title": "Recognized On"
          }
        },
        "required": [
          "ends_on",
          "amount",
          "journal_entry_id",
          "recognized_on"
        ],
        "title": "ScheduleMonthOut",
        "type": "object"
      },
      "ScheduleOut": {
        "properties": {
          "account_code": {
            "title": "Account Code",
            "type": "string"
          },
          "account_id": {
            "description": "The income or expense account it reaches month by month.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Id"
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "dimensions": {
            "description": "The department, and the value of any other dimension, carried on both lines of every entry a close posts from it, an accrual's release included. A spread schedule's are its transaction's.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "editable": {
            "description": "Whether it can be changed, paused or deleted here. A provider's follows its invoice.",
            "title": "Editable",
            "type": "boolean"
          },
          "ends_on": {
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "holding_account_code": {
            "title": "Holding Account Code",
            "type": "string"
          },
          "holding_account_id": {
            "description": "Where the part not yet used or earned waits: prepaid expenses, deferred revenue, accumulated depreciation; for an accrual, accrued liabilities.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Holding Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "holding_account_name": {
            "title": "Holding Account Name",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `sched_`.",
            "examples": [
              "sched_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "sched"
          },
          "kind": {
            "description": "`prepaid`: paid for something used over months. `revenue`: received for something earned over months. `depreciation`: equipment used up over years. `accrual`: a cost used in one month and paid in a later one.",
            "enum": [
              "revenue",
              "prepaid",
              "depreciation",
              "accrual"
            ],
            "title": "Kind",
            "type": "string"
          },
          "method": {
            "description": "`monthly`: the same share each calendar month. `daily`: by the days of each month it covers.",
            "enum": [
              "daily",
              "monthly"
            ],
            "title": "Method",
            "type": "string"
          },
          "paused_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day a person paused it; null while it runs. No close posts from a paused schedule. Resumed, the next close catches up the months it skipped.",
            "title": "Paused On"
          },
          "recognized": {
            "description": "What the closes have taken into the P&L so far. For an accrual, what waits in accrued liabilities: the estimate once its month's close has posted, nothing once it is released.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Recognized",
            "type": "string"
          },
          "release_transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "An accrual: the charge that settled it, when one did.",
            "title": "Release Transaction Id"
          },
          "released_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An accrual: the day its cost reached the books, or stopped being owed. The close of that month takes the estimate back out. Null while it waits.",
            "title": "Released On"
          },
          "remaining": {
            "description": "What is still to come: `total` less `recognized`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Remaining",
            "type": "string"
          },
          "settles_from": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An accrual: the first day a charge from its vendor, filed to its account, settles it. The day after its month for a cost billed later; its month's first day for one approved from the books' daily check, standing in for a charge the month has not had yet. Null for other schedules.",
            "title": "Settles From"
          },
          "source": {
            "description": "Who keeps it: `transaction` (a person spread one), `manual`, or the provider whose invoice it follows, such as `stripe`.",
            "title": "Source",
            "type": "string"
          },
          "starts_on": {
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "status": {
            "description": "`active` while it has something to move, `complete` once it has moved everything, `cancelled` when stopped early.",
            "enum": [
              "active",
              "complete",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "total": {
            "description": "The whole amount spread; for an accrual, the estimate.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction it spreads, when it spreads one.",
            "title": "Transaction Id"
          }
        },
        "required": [
          "id",
          "kind",
          "source",
          "description",
          "transaction_id",
          "counterparty_id",
          "counterparty_name",
          "account_id",
          "account_code",
          "account_name",
          "holding_account_id",
          "holding_account_code",
          "holding_account_name",
          "total",
          "recognized",
          "remaining",
          "currency",
          "starts_on",
          "ends_on",
          "method",
          "status",
          "editable",
          "released_on",
          "release_transaction_id",
          "created_at"
        ],
        "title": "ScheduleOut",
        "type": "object"
      },
      "SchedulePage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ScheduleOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "SchedulePage",
        "type": "object"
      },
      "SearchHit": {
        "properties": {
          "date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it happened, for a transaction or a journal entry.",
            "title": "Date"
          },
          "id": {
            "description": "Its id, for that kind's own endpoints.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "kind": {
            "description": "What kind of record matched.",
            "enum": [
              "account",
              "counterparty",
              "transaction",
              "journal_entry",
              "rule"
            ],
            "title": "Kind",
            "type": "string"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A counterparty's logo, square PNG; null for none and for other kinds.",
            "title": "Logo Url"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The short handle people say: a GL account's code, a journal entry's number.",
            "title": "Ref"
          },
          "title": {
            "description": "What the record is called: a name or a description.",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "title"
        ],
        "title": "SearchHit",
        "type": "object"
      },
      "SearchOut": {
        "properties": {
          "data": {
            "description": "The matches, grouped by kind: accounts, counterparties, transactions, journal entries, then rules.",
            "items": {
              "$ref": "#/components/schemas/SearchHit"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "SearchOut",
        "type": "object"
      },
      "SendExceptionToReviewer": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the reviewer should know: the answer, or what to look at.",
            "title": "Note"
          }
        },
        "title": "SendExceptionToReviewer",
        "type": "object"
      },
      "SessionOut": {
        "description": "A Stripe-hosted page to send the person to.",
        "properties": {
          "url": {
            "description": "The page on stripe.com. Valid for a short time; open it now.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "SessionOut",
        "type": "object"
      },
      "SetCounterparty": {
        "properties": {
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the transaction is with; null to say nobody is named.",
            "title": "Counterparty Id"
          }
        },
        "required": [
          "counterparty_id"
        ],
        "title": "SetCounterparty",
        "type": "object"
      },
      "SetDimensions": {
        "properties": {
          "dimensions": {
            "description": "Every value it is to name, at most one per dimension; the ones left out are taken off, and an empty list clears them. Refused with `dimension_invalid` when a value is not of the dimension named, and with `dimension_required` when the transaction is in the books and an account it is filed to requires a dimension left out.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionIn"
            },
            "maxItems": 20,
            "title": "Dimensions",
            "type": "array"
          }
        },
        "required": [
          "dimensions"
        ],
        "title": "SetDimensions",
        "type": "object"
      },
      "SetOpeningBalances": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "balances": {
            "items": {
              "$ref": "#/components/schemas/OpeningBalanceIn"
            },
            "maxItems": 500,
            "title": "Balances",
            "type": "array"
          }
        },
        "required": [
          "as_of",
          "balances"
        ],
        "title": "SetOpeningBalances",
        "type": "object"
      },
      "Settle": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Kept with the filing.",
            "title": "Note"
          },
          "parts": {
            "description": "What it pays: one party's invoices, or one party's bills, each for an amount, together no more than the transaction moved. What is left is the party's unapplied cash.",
            "items": {
              "$ref": "#/components/schemas/SettlePart"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Parts",
            "type": "array"
          }
        },
        "required": [
          "parts"
        ],
        "title": "Settle",
        "type": "object"
      },
      "SettlePart": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "How much of the transaction pays it.",
            "title": "Amount"
          },
          "bill_id": {
            "anyOf": [
              {
                "description": "An id that starts with `bill_`.",
                "examples": [
                  "bill_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "bill"
              },
              {
                "type": "null"
              }
            ],
            "description": "An approved bill it pays (money out).",
            "title": "Bill Id"
          },
          "invoice_id": {
            "anyOf": [
              {
                "description": "An id that starts with `inv_`.",
                "examples": [
                  "inv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "inv"
              },
              {
                "type": "null"
              }
            ],
            "description": "An issued invoice it pays (money in).",
            "title": "Invoice Id"
          }
        },
        "required": [
          "amount"
        ],
        "title": "SettlePart",
        "type": "object"
      },
      "SettlementOut": {
        "properties": {
          "pays": {
            "description": "The invoices or bills the transaction pays now; empty when it pays none.",
            "items": {
              "$ref": "#/components/schemas/SettlementPartOut"
            },
            "title": "Pays",
            "type": "array"
          },
          "proposals": {
            "description": "What the transaction could pay, best first; empty once it pays something, or for one that pays nothing (a transfer, a fee, a refund, a hold).",
            "items": {
              "$ref": "#/components/schemas/SettlementProposalOut"
            },
            "title": "Proposals",
            "type": "array"
          },
          "settled_by_ledgerit": {
            "description": "Whether LedgerIt settled it without asking, because its description names exactly one open invoice or bill and it pays exactly what was left on it. Sending the transaction back to review undoes it, and LedgerIt then asks instead.",
            "title": "Settled By Ledgerit",
            "type": "boolean"
          },
          "unapplied": {
            "description": "What of a settled transaction pays nothing yet: the party's unapplied cash.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unapplied",
            "type": "string"
          }
        },
        "required": [
          "pays",
          "unapplied",
          "settled_by_ledgerit",
          "proposals"
        ],
        "title": "SettlementOut",
        "type": "object"
      },
      "SettlementPartOut": {
        "properties": {
          "amount": {
            "description": "How much of the transaction pays it, in the books' currency.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "bill_id": {
            "anyOf": [
              {
                "description": "An id that starts with `bill_`.",
                "examples": [
                  "bill_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "bill"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bill paid, for money out; else null.",
            "title": "Bill Id"
          },
          "invoice_id": {
            "anyOf": [
              {
                "description": "An id that starts with `inv_`.",
                "examples": [
                  "inv_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "inv"
              },
              {
                "type": "null"
              }
            ],
            "description": "The invoice paid, for money in; else null.",
            "title": "Invoice Id"
          },
          "number": {
            "description": "The invoice's number, or the vendor's number on the bill.",
            "title": "Number",
            "type": "string"
          }
        },
        "required": [
          "invoice_id",
          "bill_id",
          "number",
          "amount"
        ],
        "title": "SettlementPartOut",
        "type": "object"
      },
      "SettlementProposalOut": {
        "properties": {
          "parts": {
            "description": "What it would pay, oldest first.",
            "items": {
              "$ref": "#/components/schemas/SettlementPartOut"
            },
            "title": "Parts",
            "type": "array"
          },
          "party_id": {
            "description": "The customer or vendor whose documents they are.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Party Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "party_name": {
            "title": "Party Name",
            "type": "string"
          },
          "reason": {
            "description": "Why the books propose it: `number`, the document's number is in the transaction's description; `amount`, one document is open for exactly the amount; `all_open`, the party's open documents add up to it to the cent.",
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason",
          "party_id",
          "party_name",
          "parts"
        ],
        "title": "SettlementProposalOut",
        "type": "object"
      },
      "SignOffRequest": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Anything worth keeping beside the sign-off: where the evidence is.",
            "title": "Note"
          }
        },
        "title": "SignOffRequest",
        "type": "object"
      },
      "SourceAccount": {
        "properties": {
          "id": {
            "description": "The source's own id for the account.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "is_cash": {
            "default": false,
            "description": "A bank or cash account: its balance is tied out on its own.",
            "title": "Is Cash",
            "type": "boolean"
          },
          "name": {
            "description": "Its full name in the source, `Parent:Child` included.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its account number, when the source numbers accounts.",
            "title": "Number"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`asset`, `liability`, `equity`, `income` or `expense`, when the source says. An account is only matched automatically to one of the same type.",
            "title": "Type"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "SourceAccount",
        "type": "object"
      },
      "SourceAccountChange": {
        "properties": {
          "account_id": {
            "description": "The GL account what this account sends should post to: an open, postable asset account for a bank account, a liability account for a card.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "effective_from": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rows dated this day or later post to the new GL account; earlier ones keep to the one mapped before. Left out, every row from now on does, whatever its date.",
            "title": "Effective From"
          }
        },
        "required": [
          "account_id"
        ],
        "title": "SourceAccountChange",
        "type": "object"
      },
      "SourceAccountOut": {
        "description": "One account a connection holds at its provider.",
        "properties": {
          "account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Code"
          },
          "account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "The GL account what it sends posts to; null if it was never mapped.",
            "title": "Account Id"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Name"
          },
          "connection_id": {
            "description": "The connection that reads it: its bank or card program.",
            "examples": [
              "conn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Connection Id",
            "type": "string",
            "x-id-prefix": "conn"
          },
          "connection_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What tells two connections to one provider apart; for Plaid, the bank's name.",
            "title": "Connection Label"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "entity_id": {
            "description": "The company whose books it feeds.",
            "examples": [
              "ent_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Entity Id",
            "type": "string",
            "x-id-prefix": "ent"
          },
          "entity_name": {
            "title": "Entity Name",
            "type": "string"
          },
          "gl_mappings": {
            "description": "Every GL account it has posted to and when, oldest first (decision 0088): a row posts to the one mapped on its own date. Empty if it was never mapped.",
            "items": {
              "$ref": "#/components/schemas/GlMappingOut"
            },
            "title": "Gl Mappings",
            "type": "array"
          },
          "hidden": {
            "description": "Folded away on the Bank accounts page (decision 0179). Display only: it still syncs and posts.",
            "title": "Hidden",
            "type": "boolean"
          },
          "id": {
            "description": "An id that starts with `acct_`.",
            "examples": [
              "acct_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "acct"
          },
          "is_active": {
            "description": "False once the provider stops reporting it.",
            "title": "Is Active",
            "type": "boolean"
          },
          "kind": {
            "description": "`depository` (money held) or `credit` (a card: money owed).",
            "title": "Kind",
            "type": "string"
          },
          "last_balance": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the provider last said it holds.",
            "title": "Last Balance"
          },
          "last_balance_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Balance At"
          },
          "mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its last digits, as the provider prints them.",
            "title": "Mask"
          },
          "name": {
            "description": "What the provider calls it.",
            "title": "Name",
            "type": "string"
          },
          "ownership_status": {
            "description": "`pending` while it waits for a person to say which of the connection's companies it belongs to (a login that holds several); nothing is read from it until then.",
            "enum": [
              "confirmed",
              "pending"
            ],
            "title": "Ownership Status",
            "type": "string"
          },
          "provider": {
            "description": "What the connection connects: `mercury`, `brex`, `plaid`, \u2026",
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "id",
          "connection_id",
          "provider",
          "connection_label",
          "name",
          "kind",
          "currency",
          "mask",
          "is_active",
          "account_id",
          "account_code",
          "account_name",
          "last_balance",
          "last_balance_at",
          "ownership_status",
          "entity_id",
          "entity_name",
          "hidden",
          "gl_mappings"
        ],
        "title": "SourceAccountOut",
        "type": "object"
      },
      "SourceAccountRef": {
        "description": "The provider's own account a row came from.",
        "properties": {
          "id": {
            "description": "An id that starts with `acct_`.",
            "examples": [
              "acct_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "acct"
          },
          "kind": {
            "description": "`depository` (money held) or `credit` (a card: money owed).",
            "title": "Kind",
            "type": "string"
          },
          "mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its last digits, as the provider prints them.",
            "title": "Mask"
          },
          "name": {
            "description": "What the provider calls it.",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "mask",
          "kind"
        ],
        "title": "SourceAccountRef",
        "type": "object"
      },
      "SourceBalance": {
        "properties": {
          "account_id": {
            "description": "A `SourceAccount.id`.",
            "title": "Account Id",
            "type": "string"
          },
          "credit": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Credit"
          },
          "debit": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Debit"
          }
        },
        "required": [
          "account_id"
        ],
        "title": "SourceBalance",
        "type": "object"
      },
      "SourceEntry": {
        "description": "One entry of the old books, for a full-history migration.",
        "properties": {
          "date": {
            "format": "date",
            "title": "Date",
            "type": "string"
          },
          "description": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "id": {
            "description": "The source's own id for the entry; unique.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/SourceLine"
            },
            "maxItems": 500,
            "minItems": 2,
            "title": "Lines",
            "type": "array"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its number in the source, when it has one.",
            "title": "Number"
          }
        },
        "required": [
          "id",
          "date",
          "description",
          "lines"
        ],
        "title": "SourceEntry",
        "type": "object"
      },
      "SourceFactOut": {
        "description": "One thing the provider said about the row that the books do not keep.",
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What qualifies it, verbatim: a counterparty's role.",
            "title": "Detail"
          },
          "key": {
            "description": "Which fact: one of authorized, channel, category, category_confidence, counterparty, descriptor, mcc, location, kind, note, check_number, cardholder.",
            "enum": [
              "authorized",
              "channel",
              "category",
              "category_confidence",
              "counterparty",
              "descriptor",
              "mcc",
              "location",
              "kind",
              "note",
              "check_number",
              "cardholder"
            ],
            "title": "Key",
            "type": "string"
          },
          "value": {
            "description": "The provider's value, verbatim; a date is `YYYY-MM-DD`.",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "key",
          "value",
          "detail"
        ],
        "title": "SourceFactOut",
        "type": "object"
      },
      "SourceLine": {
        "description": "One line of an entry of the old books.",
        "properties": {
          "account_id": {
            "description": "A `SourceAccount.id`.",
            "title": "Account Id",
            "type": "string"
          },
          "credit": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Credit"
          },
          "debit": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Debit"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          },
          "party_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A `SourceParty.id`: who the line is with. Required on a receivable or payable.",
            "title": "Party Id"
          }
        },
        "required": [
          "account_id"
        ],
        "title": "SourceLine",
        "type": "object"
      },
      "SourceOpenItem": {
        "description": "An invoice, bill, credit or unapplied payment still open on the\ncutover day: one row of the source's AR or AP aging.",
        "properties": {
          "account_id": {
            "description": "The `SourceAccount.id` of the receivable or payable account it sits on.",
            "title": "Account Id",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "What is left of it on the cutover day: positive for what a customer owes or a vendor is owed, negative for a credit or a payment not yet applied.",
            "title": "Amount"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it falls due; without one it falls due on the party's terms from the cutover day.",
            "title": "Due On"
          },
          "issued_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The day it was issued.",
            "title": "Issued On"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The invoice's or bill's number, when it has one.",
            "title": "Number"
          },
          "party_id": {
            "description": "A `SourceParty.id`: who owes it, or is owed it.",
            "title": "Party Id",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "party_id",
          "amount"
        ],
        "title": "SourceOpenItem",
        "type": "object"
      },
      "SourceParty": {
        "description": "A customer or vendor of the old books.",
        "properties": {
          "id": {
            "description": "The source's own id for the customer or vendor.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "Its name in the source.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "SourceParty",
        "type": "object"
      },
      "SourceRecordOut": {
        "description": "What the source knows about the transaction beyond the transaction\nitself \u2014 a card program's expense.",
        "properties": {
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The source's category, verbatim.",
            "title": "Category"
          },
          "external_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where to see it in the source's own product.",
            "title": "External Url"
          },
          "first_seen_at": {
            "format": "date-time",
            "title": "First Seen At",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `src_`.",
            "examples": [
              "src_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "src"
          },
          "is_approved": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the source approved the spend; null when it does not say.",
            "title": "Is Approved"
          },
          "kind": {
            "description": "What it is at the source, such as `expense`.",
            "title": "Kind",
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "original_amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it cost in the currency it was bought in, when that is not the billing currency.",
            "title": "Original Amount"
          },
          "original_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Currency"
          },
          "payload": {
            "additionalProperties": true,
            "description": "The latest reading, verbatim.",
            "title": "Payload",
            "type": "object"
          },
          "source": {
            "description": "The connector it came from, such as `brex`.",
            "title": "Source",
            "type": "string"
          },
          "source_ref": {
            "description": "The source's own id for it.",
            "title": "Source Ref",
            "type": "string"
          },
          "spender": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who spent it, by name.",
            "title": "Spender"
          },
          "spender_user_id": {
            "anyOf": [
              {
                "description": "An id that starts with `usr_`.",
                "examples": [
                  "usr_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "usr"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member of these books who spent it, when the books can place them; null otherwise.",
            "title": "Spender User Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The source's own word for its state, verbatim.",
            "title": "Status"
          },
          "versions": {
            "description": "Distinct readings, newest first; at most 20.",
            "items": {
              "$ref": "#/components/schemas/SourceRecordVersionOut"
            },
            "title": "Versions",
            "type": "array"
          }
        },
        "required": [
          "id",
          "source",
          "kind",
          "source_ref",
          "status",
          "is_approved",
          "category",
          "spender",
          "external_url",
          "original_amount",
          "original_currency",
          "payload",
          "first_seen_at",
          "last_seen_at",
          "versions"
        ],
        "title": "SourceRecordOut",
        "type": "object"
      },
      "SourceRecordVersionOut": {
        "description": "One distinct reading of a source record, as the source said it then.",
        "properties": {
          "fetched_at": {
            "description": "When this reading was first seen.",
            "format": "date-time",
            "title": "Fetched At",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "description": "The record verbatim, as the source sent it.",
            "title": "Payload",
            "type": "object"
          }
        },
        "required": [
          "fetched_at",
          "payload"
        ],
        "title": "SourceRecordVersionOut",
        "type": "object"
      },
      "SourceRowOut": {
        "description": "The row as the provider sent it, in its own words and on its own\naccount, before the books named, filed or matched it.",
        "properties": {
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SourceAccountRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The provider's account it came from; null for a file upload."
          },
          "amount": {
            "description": "Signed as its connector read it: negative is money out of the account. The provider's own figure and sign are in `source_payload`.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "batch_id": {
            "description": "The import that brought it in.",
            "examples": [
              "batch_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Batch Id",
            "type": "string",
            "x-id-prefix": "batch"
          },
          "batch_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "That import's name: the sync run or the file.",
            "title": "Batch Label"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "description": "The provider's description, verbatim.",
            "title": "Description",
            "type": "string"
          },
          "facts": {
            "description": "What the provider said beyond the row's own fields: when it was authorized, how it was paid, the provider's category and the parties it named. Empty for a provider LedgerIt does not read them from.",
            "items": {
              "$ref": "#/components/schemas/SourceFactOut"
            },
            "title": "Facts",
            "type": "array"
          },
          "posted_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it posted, when the provider says.",
            "title": "Posted Date"
          },
          "received_at": {
            "description": "When it was first received.",
            "format": "date-time",
            "title": "Received At",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The provider's word for its state, verbatim.",
            "title": "Status"
          },
          "txn_date": {
            "description": "The date the provider gave it.",
            "format": "date",
            "title": "Txn Date",
            "type": "string"
          }
        },
        "required": [
          "description",
          "txn_date",
          "posted_date",
          "status",
          "amount",
          "currency",
          "account",
          "batch_id",
          "batch_label",
          "received_at",
          "facts"
        ],
        "title": "SourceRowOut",
        "type": "object"
      },
      "SpendByDepartmentOut": {
        "properties": {
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "departments": {
            "description": "Every department, by code, spent or not.",
            "items": {
              "$ref": "#/components/schemas/DepartmentSpendOut"
            },
            "title": "Departments",
            "type": "array"
          },
          "since": {
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "total": {
            "description": "Every operating expense in the window.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          },
          "unassigned": {
            "description": "Operating expenses naming no department.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unassigned",
            "type": "string"
          },
          "until": {
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "since",
          "until",
          "currency",
          "departments",
          "unassigned",
          "total"
        ],
        "title": "SpendByDepartmentOut",
        "type": "object"
      },
      "SpendMonthOut": {
        "properties": {
          "amount": {
            "description": "Money out in the month, in US dollars.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "month": {
            "description": "The first day of the month.",
            "format": "date",
            "title": "Month",
            "type": "string"
          }
        },
        "required": [
          "month",
          "amount"
        ],
        "title": "SpendMonthOut",
        "type": "object"
      },
      "SpendOut": {
        "description": "The monthly spend the plan is priced by.",
        "properties": {
          "average": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Money out averaged over `months`: the monthly spend. Null when the books have no complete month yet.",
            "title": "Average"
          },
          "currency": {
            "description": "Always `USD`: plans are priced in US dollars.",
            "title": "Currency",
            "type": "string"
          },
          "months": {
            "description": "The complete months averaged, oldest first \u2014 at most `window_months`. Transfers between the company's own accounts, moves to savings and loan principal are not spend.",
            "items": {
              "$ref": "#/components/schemas/SpendMonthOut"
            },
            "title": "Months",
            "type": "array"
          },
          "months_over_ceiling": {
            "description": "How many of the latest months in a row were over the current plan's ceiling. The plan moves up when this reaches `window_months`.",
            "title": "Months Over Ceiling",
            "type": "integer"
          },
          "window_months": {
            "description": "How many months the spend is averaged over.",
            "title": "Window Months",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "average",
          "months",
          "window_months",
          "months_over_ceiling"
        ],
        "title": "SpendOut",
        "type": "object"
      },
      "Split": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "parts": {
            "description": "The accounts and amounts; they add up to the transaction's amount exactly.",
            "items": {
              "$ref": "#/components/schemas/SplitPart"
            },
            "maxItems": 20,
            "minItems": 2,
            "title": "Parts",
            "type": "array"
          },
          "post": {
            "default": true,
            "title": "Post",
            "type": "boolean"
          }
        },
        "required": [
          "parts"
        ],
        "title": "Split",
        "type": "object"
      },
      "SplitOut": {
        "description": "One part of a split transaction.",
        "properties": {
          "amount": {
            "description": "This part's share of the transaction's amount.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "category_account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "category_code": {
            "title": "Category Code",
            "type": "string"
          },
          "category_name": {
            "title": "Category Name",
            "type": "string"
          },
          "memo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          }
        },
        "required": [
          "category_account_id",
          "category_code",
          "category_name",
          "amount",
          "memo"
        ],
        "title": "SplitOut",
        "type": "object"
      },
      "SplitPart": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "description": "This part's share of the amount.",
            "title": "Amount"
          },
          "category_account_id": {
            "description": "The GL account this part is filed to.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Category Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "memo": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memo"
          }
        },
        "required": [
          "category_account_id",
          "amount"
        ],
        "title": "SplitPart",
        "type": "object"
      },
      "SpreadIn": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it is for; the transaction's description if left out.",
            "title": "Description"
          },
          "ends_on": {
            "description": "The last day it pays for.",
            "format": "date",
            "title": "Ends On",
            "type": "string"
          },
          "method": {
            "default": "monthly",
            "description": "How it is shared across months.",
            "enum": [
              "daily",
              "monthly"
            ],
            "title": "Method",
            "type": "string"
          },
          "starts_on": {
            "description": "The first day it pays for.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          },
          "transaction_id": {
            "description": "A transaction in the books, filed under one income or expense account.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Transaction Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "transaction_id",
          "starts_on",
          "ends_on"
        ],
        "title": "SpreadIn",
        "type": "object"
      },
      "SpreadOut": {
        "description": "A prepaid spread: the payment covers this many months from `start`.",
        "properties": {
          "months": {
            "description": "How many months the payment covers.",
            "title": "Months",
            "type": "integer"
          },
          "start": {
            "description": "The first month it covers (its first day).",
            "format": "date",
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "months",
          "start"
        ],
        "title": "SpreadOut",
        "type": "object"
      },
      "SubmissionOut": {
        "description": "How a payment LedgerIt sends went to its provider.",
        "properties": {
          "answered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At"
          },
          "checks": {
            "description": "How many times the provider was asked whether it holds the payment.",
            "title": "Checks",
            "type": "integer"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The provider's id for the payment, once it holds it.",
            "title": "External Id"
          },
          "failure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the provider refused it, in its words.",
            "title": "Failure"
          },
          "provider": {
            "description": "The provider it was sent through.",
            "title": "Provider",
            "type": "string"
          },
          "status": {
            "description": "`sending`, then the provider's answer: `accepted` (it holds the payment), `rejected` (it refused it), `uncertain` (no answer yet: it is asked, never sent again) or `absent` (asked, it holds no such payment).",
            "title": "Status",
            "type": "string"
          },
          "submitted_at": {
            "format": "date-time",
            "title": "Submitted At",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "status",
          "external_id",
          "failure",
          "checks",
          "submitted_at",
          "answered_at"
        ],
        "title": "SubmissionOut",
        "type": "object"
      },
      "SuggestionReasonOut": {
        "description": "One reason a suggestion is made.",
        "properties": {
          "code": {
            "description": "`proposed`: people proposed it in an open comment (`count` of them). `counterparty_default`: the counterparty's default account. `filed_before`: the payee was filed there before (`count` times). `model`: the model proposed it (`count`: its confidence in percent). `same_amount`: the other row is the same amount to the cent, moving the other way. `days_apart`: how far apart the two are dated (`count` days). `paired_before`: transfers between the two accounts before (`count`). `names_the_books`: the transaction names the company itself. `candidates`: how many rows could be its other half (`count`), when several. `filed_as_transfer`: a person filed transactions like this one, from this account, as transfers with the suggestion's other account before (`count` of them). On a transfer, `model` means the model read it as this transfer (`count`: its confidence in percent; its words in `model_reasoning`). Owner and financing (`transactions.list_capital_options`): `founder` and `investor`, the transaction comes from or names a founder or investor of these books; `instrument_investor`, it comes from or names the instrument's own investor; `names_entity`, it names the other company; `filed_for`, the payee was filed for this purpose before (`count` times); `loan_outstanding`, what the books owe their owners on loan covers it.",
            "enum": [
              "proposed",
              "counterparty_default",
              "filed_before",
              "model",
              "same_amount",
              "days_apart",
              "paired_before",
              "names_the_books",
              "candidates",
              "filed_as_transfer",
              "founder",
              "investor",
              "instrument_investor",
              "names_entity",
              "filed_for",
              "loan_outstanding"
            ],
            "title": "Code",
            "type": "string"
          },
          "count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The number the reason says, when it says one.",
            "title": "Count"
          }
        },
        "required": [
          "code"
        ],
        "title": "SuggestionReasonOut",
        "type": "object"
      },
      "SupportedTransactionOut": {
        "description": "A transaction a document supports, as much as a list row names.",
        "properties": {
          "account_id": {
            "description": "The bank or card account it moved on.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "amount": {
            "description": "Unsigned; `event_type` says which way the money went.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "counterparty_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their logo, square PNG on our own storage; null for none.",
            "title": "Counterparty Logo Url"
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the money went to, when a source named them.",
            "title": "Counterparty Name"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "event_date": {
            "format": "date",
            "title": "Event Date",
            "type": "string"
          },
          "event_type": {
            "description": "What kind of movement it was, such as `expense` or `income`.",
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "description": "The transaction; open it with `GET /transactions/{id}`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "txn"
          }
        },
        "required": [
          "id",
          "event_date",
          "description",
          "amount",
          "currency",
          "event_type",
          "account_id",
          "account_name",
          "counterparty_name",
          "counterparty_logo_url"
        ],
        "title": "SupportedTransactionOut",
        "type": "object"
      },
      "SwingDriverOut": {
        "description": "Part of an account's month, by what it came from.",
        "properties": {
          "amount": {
            "description": "Its part of the month, signed like the account's.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "id": {
            "description": "The schedule's id, the counterparty's, or the journal source for `source`.",
            "examples": [
              "je_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "*"
          },
          "kind": {
            "description": "`schedule`: the shares of one recognition schedule (a spread, an accrual, depreciation). `counterparty`: what was posted for one vendor or customer. `source`: entries with neither, by what posted them (`manual`, `financing`, \u2026).",
            "enum": [
              "schedule",
              "counterparty",
              "source"
            ],
            "title": "Kind",
            "type": "string"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A counterparty's logo, when it has one; null for initials.",
            "title": "Logo Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The schedule's description or the counterparty's name; null for a source.",
            "title": "Name"
          },
          "usual": {
            "description": "Its part of the usual month: the average of the months before.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Usual",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "name",
          "amount",
          "usual"
        ],
        "title": "SwingDriverOut",
        "type": "object"
      },
      "TaxLineList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TaxLineOut"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "TaxLineList",
        "type": "object"
      },
      "TaxLineOut": {
        "properties": {
          "balance": {
            "description": "Read off the year-end balance (Schedule L), not the year's activity.",
            "title": "Balance",
            "type": "boolean"
          },
          "key": {
            "description": "`<part>:<line>`: `1120:13`, `L:2a`, `M1:2`.",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "The line's words on the form.",
            "title": "Label",
            "type": "string"
          },
          "normal": {
            "description": "`debit` or `credit`: the side a positive figure is on.",
            "title": "Normal",
            "type": "string"
          },
          "part": {
            "description": "`income`, `deductions`, `schedule_l` or `schedule_m1`.",
            "title": "Part",
            "type": "string"
          }
        },
        "required": [
          "key",
          "part",
          "label",
          "normal",
          "balance"
        ],
        "title": "TaxLineOut",
        "type": "object"
      },
      "TaxReportAccountOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "beginning": {
            "description": "Schedule L: the balance the day before the year began.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Beginning",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "source",
          "amount",
          "beginning"
        ],
        "title": "TaxReportAccountOut",
        "type": "object"
      },
      "TaxReportLineOut": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/TaxReportAccountOut"
            },
            "title": "Accounts",
            "type": "array"
          },
          "amount": {
            "description": "Positive on the line's normal side: the year's activity, or its closing balance.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "beginning": {
            "description": "Schedule L only: the balance at the start of the year.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Beginning",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "part": {
            "title": "Part",
            "type": "string"
          }
        },
        "required": [
          "key",
          "part",
          "label",
          "amount",
          "beginning",
          "accounts"
        ],
        "title": "TaxReportLineOut",
        "type": "object"
      },
      "TaxReportOut": {
        "properties": {
          "beginning_total_assets": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Beginning Total Assets",
            "type": "string"
          },
          "beginning_total_liabilities_and_equity": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Beginning Total Liabilities And Equity",
            "type": "string"
          },
          "income_per_books": {
            "description": "Page 1's income less its deductions, before income tax.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Income Per Books",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/TaxReportLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "since": {
            "format": "date",
            "title": "Since",
            "type": "string"
          },
          "total_assets": {
            "description": "Schedule L at the year's end.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Assets",
            "type": "string"
          },
          "total_liabilities_and_equity": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Liabilities And Equity",
            "type": "string"
          },
          "until": {
            "format": "date",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "since",
          "until",
          "lines",
          "income_per_books",
          "total_assets",
          "total_liabilities_and_equity",
          "beginning_total_assets",
          "beginning_total_liabilities_and_equity"
        ],
        "title": "TaxReportOut",
        "type": "object"
      },
      "ThresholdOut": {
        "properties": {
          "name": {
            "description": "What it measures, such as `multiple_of_median` or `days`. Amounts are in the books' own currency.",
            "title": "Name",
            "type": "string"
          },
          "value": {
            "description": "Its default, before any vendor's tolerance widens it.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "title": "ThresholdOut",
        "type": "object"
      },
      "TransactionChanges": {
        "description": "Only the fields sent change. `description` and `event_date` are typed\nwithout null and default to None only so that leaving one out means\n\"unchanged\"; `note` is cleared by sending null.",
        "properties": {
          "description": {
            "description": "What it is called in these books. The source's own words stay in `source_description`.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "event_date": {
            "description": "The day it happened. A transaction in the books is posted again on the new day by reversing its entry, so the correction is on the record; refused with `period_closed` while either month is closed.",
            "format": "date",
            "title": "Event Date",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A note kept with it; null to clear it.",
            "title": "Note"
          }
        },
        "title": "TransactionChanges",
        "type": "object"
      },
      "TransactionDetailOut": {
        "description": "One transaction with everything its sources said about it.",
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last digits of the bank account or card it moved on, as its provider prints them; null when no provider reported it. Kept apart from `account_name`, so a renamed account still says which card it is.",
            "title": "Account Mask"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "capital_purpose": {
            "anyOf": [
              {
                "enum": [
                  "owner_loan",
                  "stock_purchase",
                  "contribution",
                  "owner_loan_repayment",
                  "distribution"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What a person filed it as, when it is money between the company and its owners (`transactions.file_as_owner_money`): `owner_loan`, `stock_purchase`, `contribution`, `owner_loan_repayment` or `distribution`. Null otherwise.",
            "title": "Capital Purpose"
          },
          "cash_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The financing or intercompany entry that already holds its cash (`transactions.link_cash`). Excluded when that entry moved its own account; a transfer from the entry's account when it did not. Null when it stands for no such entry.",
            "title": "Cash Entry Id"
          },
          "cash_link_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The instrument's name, or the other company's, for the entry it stands for.",
            "title": "Cash Link Name"
          },
          "category_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Account Id"
          },
          "category_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Code"
          },
          "category_confidence": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Confidence"
          },
          "category_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Name"
          },
          "category_rationale": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Rationale"
          },
          "category_source": {
            "title": "Category Source",
            "type": "string"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Id"
          },
          "counterparty_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The counterparty's logo, square PNG; null for none.",
            "title": "Counterparty Logo Url"
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Name"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "dimensions": {
            "description": "Its department and other dimension values, carried onto the lines it posts to the accounts it is filed to (`transactions.set_dimensions`). Empty when it names none.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which way the money moved on `account_id`: `in` or `out`.",
            "title": "Direction"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentOut"
            },
            "title": "Documents",
            "type": "array"
          },
          "event_date": {
            "format": "date",
            "title": "Event Date",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "financing_instrument_id": {
            "anyOf": [
              {
                "description": "An id that starts with `fin_`.",
                "examples": [
                  "fin_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "fin"
              },
              {
                "type": "null"
              }
            ],
            "description": "The SAFE, note or venture debt whose cash it is; null otherwise.",
            "title": "Financing Instrument Id"
          },
          "fixed_asset_id": {
            "anyOf": [
              {
                "description": "An id that starts with `asset_`.",
                "examples": [
                  "asset_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "asset"
              },
              {
                "type": "null"
              }
            ],
            "description": "The fixed asset capitalized from it (`transactions.capitalize`); null when it bought none. While one names it, it stays filed to the asset's account.",
            "title": "Fixed Asset Id"
          },
          "id": {
            "description": "An id that starts with `txn_`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "txn"
          },
          "intercompany_transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `ic_`.",
                "examples": [
                  "ic_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "ic"
              },
              {
                "type": "null"
              }
            ],
            "description": "The intercompany transaction whose cash it is; null otherwise.",
            "title": "Intercompany Transaction Id"
          },
          "journal_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Journal Entry Id"
          },
          "match_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Kind"
          },
          "matched_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Event Id"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A note a person kept with it (`transactions.update`); null for none.",
            "title": "Note"
          },
          "open_proposals": {
            "default": 0,
            "description": "How many unresolved comments propose a GL account for it. Counted when transactions are listed; 0 elsewhere.",
            "title": "Open Proposals",
            "type": "integer"
          },
          "other_account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The other account's code; null when there is none.",
            "title": "Other Account Code"
          },
          "other_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a transfer, the books' own account at its other end: where the money went, or where it came from. Null for every other kind of transaction.",
            "title": "Other Account Id"
          },
          "other_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The other account's name; null when there is none.",
            "title": "Other Account Name"
          },
          "pending": {
            "title": "Pending",
            "type": "boolean"
          },
          "received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the row was first received.",
            "title": "Received At"
          },
          "refund_of_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refund Of Event Id"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "schedule_id": {
            "anyOf": [
              {
                "description": "An id that starts with `sched_`.",
                "examples": [
                  "sched_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "sched"
              },
              {
                "type": "null"
              }
            ],
            "description": "The schedule spreading it over the months it pays for; null when it counts in its own month (`schedules.create`).",
            "title": "Schedule Id"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Description"
          },
          "source_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The row exactly as the source first sent it. Never edited.",
            "title": "Source Payload"
          },
          "source_records": {
            "items": {
              "$ref": "#/components/schemas/SourceRecordOut"
            },
            "title": "Source Records",
            "type": "array"
          },
          "source_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The source's own id for the row.",
            "title": "Source Ref"
          },
          "source_row": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SourceRowOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The row as its source sent it; null for one a person entered."
          },
          "splits": {
            "description": "The GL accounts it is split across, each with its share. Empty when one account carries it (`category_account_id`).",
            "items": {
              "$ref": "#/components/schemas/SplitOut"
            },
            "title": "Splits",
            "type": "array"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_date",
          "description",
          "amount",
          "currency",
          "event_type",
          "status",
          "account_id",
          "account_name",
          "category_account_id",
          "category_code",
          "category_name",
          "category_source",
          "category_confidence",
          "category_rationale",
          "reviewed_at",
          "journal_entry_id",
          "source",
          "source_description",
          "pending",
          "matched_event_id",
          "match_kind",
          "refund_of_event_id",
          "counterparty_id",
          "counterparty_name",
          "documents",
          "source_ref",
          "received_at",
          "source_payload",
          "source_records"
        ],
        "title": "TransactionDetailOut",
        "type": "object"
      },
      "TransactionOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "account_mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last digits of the bank account or card it moved on, as its provider prints them; null when no provider reported it. Kept apart from `account_name`, so a renamed account still says which card it is.",
            "title": "Account Mask"
          },
          "account_name": {
            "title": "Account Name",
            "type": "string"
          },
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "capital_purpose": {
            "anyOf": [
              {
                "enum": [
                  "owner_loan",
                  "stock_purchase",
                  "contribution",
                  "owner_loan_repayment",
                  "distribution"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What a person filed it as, when it is money between the company and its owners (`transactions.file_as_owner_money`): `owner_loan`, `stock_purchase`, `contribution`, `owner_loan_repayment` or `distribution`. Null otherwise.",
            "title": "Capital Purpose"
          },
          "cash_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "description": "The financing or intercompany entry that already holds its cash (`transactions.link_cash`). Excluded when that entry moved its own account; a transfer from the entry's account when it did not. Null when it stands for no such entry.",
            "title": "Cash Entry Id"
          },
          "cash_link_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The instrument's name, or the other company's, for the entry it stands for.",
            "title": "Cash Link Name"
          },
          "category_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Account Id"
          },
          "category_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Code"
          },
          "category_confidence": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Confidence"
          },
          "category_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Name"
          },
          "category_rationale": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Rationale"
          },
          "category_source": {
            "title": "Category Source",
            "type": "string"
          },
          "counterparty_id": {
            "anyOf": [
              {
                "description": "An id that starts with `party_`.",
                "examples": [
                  "party_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "party"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Id"
          },
          "counterparty_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The counterparty's logo, square PNG; null for none.",
            "title": "Counterparty Logo Url"
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Name"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "dimensions": {
            "description": "Its department and other dimension values, carried onto the lines it posts to the accounts it is filed to (`transactions.set_dimensions`). Empty when it names none.",
            "items": {
              "$ref": "#/components/schemas/LineDimensionOut"
            },
            "title": "Dimensions",
            "type": "array"
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which way the money moved on `account_id`: `in` or `out`.",
            "title": "Direction"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentOut"
            },
            "title": "Documents",
            "type": "array"
          },
          "event_date": {
            "format": "date",
            "title": "Event Date",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "financing_instrument_id": {
            "anyOf": [
              {
                "description": "An id that starts with `fin_`.",
                "examples": [
                  "fin_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "fin"
              },
              {
                "type": "null"
              }
            ],
            "description": "The SAFE, note or venture debt whose cash it is; null otherwise.",
            "title": "Financing Instrument Id"
          },
          "fixed_asset_id": {
            "anyOf": [
              {
                "description": "An id that starts with `asset_`.",
                "examples": [
                  "asset_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "asset"
              },
              {
                "type": "null"
              }
            ],
            "description": "The fixed asset capitalized from it (`transactions.capitalize`); null when it bought none. While one names it, it stays filed to the asset's account.",
            "title": "Fixed Asset Id"
          },
          "id": {
            "description": "An id that starts with `txn_`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "txn"
          },
          "intercompany_transaction_id": {
            "anyOf": [
              {
                "description": "An id that starts with `ic_`.",
                "examples": [
                  "ic_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "ic"
              },
              {
                "type": "null"
              }
            ],
            "description": "The intercompany transaction whose cash it is; null otherwise.",
            "title": "Intercompany Transaction Id"
          },
          "journal_entry_id": {
            "anyOf": [
              {
                "description": "An id that starts with `je_`.",
                "examples": [
                  "je_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "je"
              },
              {
                "type": "null"
              }
            ],
            "title": "Journal Entry Id"
          },
          "match_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Match Kind"
          },
          "matched_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Event Id"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A note a person kept with it (`transactions.update`); null for none.",
            "title": "Note"
          },
          "open_proposals": {
            "default": 0,
            "description": "How many unresolved comments propose a GL account for it. Counted when transactions are listed; 0 elsewhere.",
            "title": "Open Proposals",
            "type": "integer"
          },
          "other_account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The other account's code; null when there is none.",
            "title": "Other Account Code"
          },
          "other_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a transfer, the books' own account at its other end: where the money went, or where it came from. Null for every other kind of transaction.",
            "title": "Other Account Id"
          },
          "other_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The other account's name; null when there is none.",
            "title": "Other Account Name"
          },
          "pending": {
            "title": "Pending",
            "type": "boolean"
          },
          "refund_of_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refund Of Event Id"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "schedule_id": {
            "anyOf": [
              {
                "description": "An id that starts with `sched_`.",
                "examples": [
                  "sched_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "sched"
              },
              {
                "type": "null"
              }
            ],
            "description": "The schedule spreading it over the months it pays for; null when it counts in its own month (`schedules.create`).",
            "title": "Schedule Id"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Description"
          },
          "splits": {
            "description": "The GL accounts it is split across, each with its share. Empty when one account carries it (`category_account_id`).",
            "items": {
              "$ref": "#/components/schemas/SplitOut"
            },
            "title": "Splits",
            "type": "array"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_date",
          "description",
          "amount",
          "currency",
          "event_type",
          "status",
          "account_id",
          "account_name",
          "category_account_id",
          "category_code",
          "category_name",
          "category_source",
          "category_confidence",
          "category_rationale",
          "reviewed_at",
          "journal_entry_id",
          "source",
          "source_description",
          "pending",
          "matched_event_id",
          "match_kind",
          "refund_of_event_id",
          "counterparty_id",
          "counterparty_name",
          "documents"
        ],
        "title": "TransactionOut",
        "type": "object"
      },
      "TransactionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TransactionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "TransactionPage",
        "type": "object"
      },
      "TransactionReceiptsOut": {
        "properties": {
          "documents": {
            "description": "The receipts and invoices it has, oldest first.",
            "items": {
              "$ref": "#/components/schemas/ReceiptEvidenceOut"
            },
            "title": "Documents",
            "type": "array"
          },
          "forward_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The address receipts are forwarded to. Null for a caller who may not attach receipts, or where this deployment does not receive email.",
            "title": "Forward Address"
          },
          "suggestions": {
            "description": "While it has no receipt: unclaimed receipts that might be its, likeliest first, at most five. Empty once it has one.",
            "items": {
              "$ref": "#/components/schemas/ReceiptSuggestionOut"
            },
            "title": "Suggestions",
            "type": "array"
          },
          "transaction_id": {
            "description": "An id that starts with `txn_`.",
            "examples": [
              "txn_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Transaction Id",
            "type": "string",
            "x-id-prefix": "txn"
          },
          "wanted": {
            "description": "Whether the books are waiting for this transaction's receipt: an open `missing_receipt` item names it. Only then does a mailbox search look for it.",
            "title": "Wanted",
            "type": "boolean"
          }
        },
        "required": [
          "transaction_id",
          "wanted",
          "documents",
          "suggestions",
          "forward_address"
        ],
        "title": "TransactionReceiptsOut",
        "type": "object"
      },
      "TransferSuggestionOut": {
        "description": "A transfer between the books' own accounts this transaction probably\nis, typed by what picking it does.",
        "properties": {
          "kind": {
            "description": "`match`: pair it with `other_event_id`, its other half (`transactions.match`). `transfer_account`: file it as a transfer to or from `other_account_id` (`transactions.file_as_transfer`). `in_transit`: file it as a transfer against 1090 Cash in transit, its other account not being connected (`transactions.file_as_transfer` with no account).",
            "enum": [
              "match",
              "transfer_account",
              "in_transit"
            ],
            "title": "Kind",
            "type": "string"
          },
          "model_reasoning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The model's own words, when it read the transaction as this transfer. It is never filed on them: a person picks it.",
            "title": "Model Reasoning"
          },
          "other_account_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Other Account Code"
          },
          "other_account_id": {
            "anyOf": [
              {
                "description": "An id that starts with `gla_`.",
                "examples": [
                  "gla_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "gla"
              },
              {
                "type": "null"
              }
            ],
            "description": "`match`: the other half's account; `transfer_account`: the account named. Null for `in_transit`.",
            "title": "Other Account Id"
          },
          "other_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Other Account Name"
          },
          "other_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`match`: the other half's description.",
            "title": "Other Description"
          },
          "other_event_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`match`: the other half's date.",
            "title": "Other Event Date"
          },
          "other_event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "`match`: the transaction that would be its other half.",
            "title": "Other Event Id"
          },
          "reasons": {
            "description": "Why it is suggested.",
            "items": {
              "$ref": "#/components/schemas/SuggestionReasonOut"
            },
            "title": "Reasons",
            "type": "array"
          },
          "score": {
            "description": "0 to 1, deterministic: the same amount is required; a nearer date, transfers between the same two accounts before, transactions like this one filed as transfers with the same account before, the model reading it as this transfer and the transaction naming the company itself score higher. A match outranks an account, which outranks Cash in transit.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Score",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "score",
          "reasons"
        ],
        "title": "TransferSuggestionOut",
        "type": "object"
      },
      "TrialBalanceOut": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "balanced": {
            "title": "Balanced",
            "type": "boolean"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "difference": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Difference",
            "type": "string"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/TrialBalanceRowOut"
            },
            "title": "Rows",
            "type": "array"
          },
          "total_credits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Credits",
            "type": "string"
          },
          "total_debits": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Debits",
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "currency",
          "rows",
          "total_debits",
          "total_credits",
          "balanced",
          "difference"
        ],
        "title": "TrialBalanceOut",
        "type": "object"
      },
      "TrialBalanceRowOut": {
        "properties": {
          "account_id": {
            "description": "An id that starts with `gla_`.",
            "examples": [
              "gla_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Account Id",
            "type": "string",
            "x-id-prefix": "gla"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "credit": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Credit",
            "type": "string"
          },
          "debit": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Debit",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "code",
          "name",
          "type",
          "debit",
          "credit"
        ],
        "title": "TrialBalanceRowOut",
        "type": "object"
      },
      "TypeCount": {
        "properties": {
          "category": {
            "enum": [
              "transactions",
              "reconciliation",
              "journal",
              "close",
              "review",
              "rules",
              "records"
            ],
            "title": "Category",
            "type": "string"
          },
          "contribution_type": {
            "enum": [
              "transaction.categorized",
              "transaction.classified",
              "transaction.excluded",
              "transaction.matched",
              "transaction.reconciled",
              "account.reconciled",
              "journal_entry.posted",
              "journal_entry.updated",
              "journal_entry.reversed",
              "rule.created",
              "rule.updated",
              "exception.resolved",
              "close_task.completed",
              "period.closed",
              "period.locked",
              "period.reopened",
              "review.completed",
              "ai_work.approved",
              "ai_work.corrected",
              "counterparty.created",
              "counterparty.updated",
              "data.imported",
              "evidence.attached"
            ],
            "title": "Contribution Type",
            "type": "string"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "contribution_type",
          "category",
          "count"
        ],
        "title": "TypeCount",
        "type": "object"
      },
      "Unmatch": {
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "Unmatch",
        "type": "object"
      },
      "UpcomingBillOut": {
        "properties": {
          "above_usual": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How much a bill comes to over the vendor's usual bill, when it is at least 1.25\u00d7 it: worth a look before it is paid.",
            "title": "Above Usual"
          },
          "amount": {
            "description": "What is due, in the books' currency: what is still owed on a bill, or the vendor's usual bill.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "bill_id": {
            "anyOf": [
              {
                "description": "An id that starts with `bill_`.",
                "examples": [
                  "bill_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "bill"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bill, for a bill the books hold.",
            "title": "Bill Id"
          },
          "bill_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bill's status: draft or approved.",
            "title": "Bill Status"
          },
          "counterparty_id": {
            "description": "The vendor.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "counterparty_name": {
            "title": "Counterparty Name",
            "type": "string"
          },
          "due_on": {
            "description": "When its money is due: a bill's due date; for an expected one, the day it usually lands, plus the vendor's payment terms when it sends bills.",
            "format": "date",
            "title": "Due On",
            "type": "string"
          },
          "every_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between the vendor's bills, when it keeps a rhythm: 1, 3, 12.",
            "title": "Every Months"
          },
          "kind": {
            "description": "`bill`: a bill the books hold, and what is still owed on it. `expected`: one the vendor's billing rhythm says is coming, at its usual amount.",
            "title": "Kind",
            "type": "string"
          },
          "late": {
            "description": "A bill past its due date and not paid, or an expected one whose usual day has passed without it.",
            "title": "Late",
            "type": "boolean"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor's logo, when it has one.",
            "title": "Logo Url"
          },
          "usual_amount": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the vendor keeps a rhythm: for an expected bill, what its bill usually comes to; for a bill in, what that bill is measured against, the higher of the vendor's bills before it in its rhythm.",
            "title": "Usual Amount"
          },
          "vendor_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor's own number for the bill.",
            "title": "Vendor Number"
          }
        },
        "required": [
          "kind",
          "due_on",
          "late",
          "counterparty_id",
          "counterparty_name",
          "logo_url",
          "amount",
          "bill_id",
          "vendor_number",
          "bill_status",
          "every_months",
          "usual_amount",
          "above_usual"
        ],
        "title": "UpcomingBillOut",
        "type": "object"
      },
      "UpcomingBillsOut": {
        "properties": {
          "as_of": {
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "billed_total": {
            "description": "What is owed on the bills the books hold.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Billed Total",
            "type": "string"
          },
          "bills": {
            "description": "Soonest first, overdue and late ones at the top.",
            "items": {
              "$ref": "#/components/schemas/UpcomingBillOut"
            },
            "title": "Bills",
            "type": "array"
          },
          "currency": {
            "description": "The books' currency. Bills in any other currency are left out.",
            "title": "Currency",
            "type": "string"
          },
          "expected_total": {
            "description": "The bills expected from vendors' rhythms, not in yet.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Expected Total",
            "type": "string"
          },
          "through": {
            "description": "The last day the list covers.",
            "format": "date",
            "title": "Through",
            "type": "string"
          },
          "total": {
            "description": "Every bill on the list.",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "through",
          "currency",
          "total",
          "billed_total",
          "expected_total",
          "bills"
        ],
        "title": "UpcomingBillsOut",
        "type": "object"
      },
      "VendorYearOut": {
        "properties": {
          "counterparty_id": {
            "description": "An id that starts with `party_`.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "form_1099_category": {
            "anyOf": [
              {
                "enum": [
                  "nec",
                  "misc"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`nec` or `misc`; null when not chosen.",
            "title": "Form 1099 Category"
          },
          "is_1099_eligible": {
            "description": "Marked 1099-eligible on their vendor role.",
            "title": "Is 1099 Eligible",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "needs_w9": {
            "description": "1099-eligible, over the threshold, and no W-9 on file.",
            "title": "Needs W9",
            "type": "boolean"
          },
          "over_threshold": {
            "description": "Paid at least the year's filing threshold.",
            "title": "Over Threshold",
            "type": "boolean"
          },
          "paid": {
            "description": "Paid in the year in the books' currency, by bank and recorded payments, less refunds; card payments are left out (they go on a 1099-K).",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Paid",
            "type": "string"
          },
          "tax_id_on_file": {
            "description": "A tax id is recorded for them. The id itself is never returned here.",
            "title": "Tax Id On File",
            "type": "boolean"
          },
          "w9_received_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When their W-9 was collected, or null.",
            "title": "W9 Received On"
          },
          "w9_requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a W-9 was asked of them by email and is still awaited, or null.",
            "title": "W9 Requested At"
          }
        },
        "required": [
          "counterparty_id",
          "name",
          "is_1099_eligible",
          "form_1099_category",
          "paid",
          "over_threshold",
          "w9_received_on",
          "tax_id_on_file",
          "needs_w9",
          "w9_requested_at"
        ],
        "title": "VendorYearOut",
        "type": "object"
      },
      "VestingSchedule": {
        "properties": {
          "cliff_months": {
            "description": "Months before anything vests: 12 for a one-year cliff, 0 for none.",
            "title": "Cliff Months",
            "type": "integer"
          },
          "months": {
            "description": "How many months it vests over: 48 for four years.",
            "title": "Months",
            "type": "integer"
          },
          "starts_on": {
            "description": "The vesting start date, often the day the holder started work.",
            "format": "date",
            "title": "Starts On",
            "type": "string"
          }
        },
        "required": [
          "starts_on",
          "months",
          "cliff_months"
        ],
        "title": "VestingSchedule",
        "type": "object"
      },
      "W9RequestCreate": {
        "properties": {
          "counterparty_id": {
            "description": "The vendor to ask. Asking again cancels their open request.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "email": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 3,
                "pattern": "^[^@\\s]+@[^@\\s]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where to send the link. The vendor's own email when left out.",
            "title": "Email"
          }
        },
        "required": [
          "counterparty_id"
        ],
        "title": "W9RequestCreate",
        "type": "object"
      },
      "W9RequestOut": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lines 5 and 6: their address.",
            "title": "Address"
          },
          "business_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line 2: their business or disregarded entity name.",
            "title": "Business Name"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelled At"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "counterparty_id": {
            "description": "The vendor it was asked of.",
            "examples": [
              "party_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Counterparty Id",
            "type": "string",
            "x-id-prefix": "party"
          },
          "emailed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "On a request just made: whether the email went. Null when read later.",
            "title": "Emailed"
          },
          "expired": {
            "description": "Open, but its link stopped working: ask again for a new one.",
            "title": "Expired",
            "type": "boolean"
          },
          "expires_at": {
            "description": "When its link stops working.",
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `tin_req_`.",
            "examples": [
              "tin_req_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "tin_req"
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line 1 of the W-9: the name on their tax return.",
            "title": "Legal Name"
          },
          "sent_at": {
            "format": "date-time",
            "title": "Sent At",
            "type": "string"
          },
          "sent_to": {
            "description": "The address the link was emailed to.",
            "title": "Sent To",
            "type": "string"
          },
          "signed_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name they signed the certification with.",
            "title": "Signed Name"
          },
          "status": {
            "description": "`open` until the vendor completes it (`completed`) or it is cancelled or replaced (`cancelled`).",
            "enum": [
              "open",
              "completed",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "tax_classification": {
            "anyOf": [
              {
                "enum": [
                  "individual",
                  "c_corporation",
                  "s_corporation",
                  "partnership",
                  "trust_estate",
                  "llc_c",
                  "llc_s",
                  "llc_p",
                  "other"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line 3a: their federal tax classification.",
            "title": "Tax Classification"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor's taxpayer identification number on file, whole for a member who may read sensitive data and masked to its last four digits for anyone else.",
            "title": "Tax Id"
          },
          "tin_type": {
            "anyOf": [
              {
                "enum": [
                  "ssn",
                  "ein"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Part I: a social security number or an employer identification number.",
            "title": "Tin Type"
          }
        },
        "required": [
          "id",
          "counterparty_id",
          "sent_to",
          "status",
          "expired",
          "sent_at",
          "expires_at",
          "completed_at",
          "cancelled_at",
          "legal_name",
          "business_name",
          "tax_classification",
          "tin_type",
          "tax_id",
          "address",
          "signed_name"
        ],
        "title": "W9RequestOut",
        "type": "object"
      },
      "W9RequestPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/W9RequestOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "W9RequestPage",
        "type": "object"
      },
      "WebhookDeliveryOut": {
        "properties": {
          "attempts": {
            "description": "Times it has been tried.",
            "title": "Attempts",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "event_id": {
            "description": "The event, and the `id` of the body sent.",
            "examples": [
              "evt_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Event Id",
            "type": "string",
            "x-id-prefix": "evt"
          },
          "event_type": {
            "description": "What happened, such as `entry.posted`.",
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "description": "An id that starts with `dlv_`.",
            "examples": [
              "dlv_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "dlv"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the last try failed, such as `HTTP 500`.",
            "title": "Last Error"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it is tried next, while pending.",
            "title": "Next Attempt At"
          },
          "status": {
            "description": "`pending` until the address answers 2xx, then `delivered`.",
            "enum": [
              "pending",
              "delivered"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_id",
          "event_type",
          "status",
          "attempts",
          "next_attempt_at",
          "last_error",
          "delivered_at",
          "created_at"
        ],
        "title": "WebhookDeliveryOut",
        "type": "object"
      },
      "WebhookDeliveryPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "WebhookDeliveryPage",
        "type": "object"
      },
      "WebhookSecret": {
        "properties": {
          "secret": {
            "description": "What each delivery is signed with: the `LedgerIt-Signature` header is the HMAC-SHA256 of `<t>.<body>` under it.",
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "secret"
        ],
        "title": "WebhookSecret",
        "type": "object"
      },
      "WebhookSubscriptionCreate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it is for.",
            "title": "Description"
          },
          "event_types": {
            "default": [],
            "description": "The events to send: types such as `entry.posted`, or families such as `entry.*`. Empty sends every event.",
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "title": "Event Types",
            "type": "array"
          },
          "url": {
            "description": "An https address.",
            "maxLength": 2048,
            "minLength": 9,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "WebhookSubscriptionCreate",
        "type": "object"
      },
      "WebhookSubscriptionOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it is for, as its maker put it.",
            "title": "Description"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "enum": [
                  "person",
                  "failing"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it is off: `person` when someone switched it off, `failing` when its deliveries failed for three days. Null while it is on.",
            "title": "Disabled Reason"
          },
          "enabled": {
            "description": "Whether events are being sent to it.",
            "title": "Enabled",
            "type": "boolean"
          },
          "event_types": {
            "description": "The event types and families it is sent. Empty: every event.",
            "items": {
              "type": "string"
            },
            "title": "Event Types",
            "type": "array"
          },
          "failing_since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first failure since a delivery last landed. Null while deliveries land.",
            "title": "Failing Since"
          },
          "id": {
            "description": "An id that starts with `whsub_`.",
            "examples": [
              "whsub_01h455vb4pex5vsknk084sn02q"
            ],
            "title": "Id",
            "type": "string",
            "x-id-prefix": "whsub"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "url": {
            "description": "The https address events are POSTed to.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "event_types",
          "enabled",
          "disabled_reason",
          "failing_since",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookSubscriptionOut",
        "type": "object"
      },
      "WebhookSubscriptionPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookSubscriptionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "WebhookSubscriptionPage",
        "type": "object"
      },
      "WebhookSubscriptionUpdate": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What it is for. An empty string clears it.",
            "title": "Description"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Switch it off, or back on. Back on, the deliveries that waited are sent at once.",
            "title": "Enabled"
          },
          "event_types": {
            "anyOf": [
              {
                "description": "The events to send: types such as `entry.posted`, or families such as `entry.*`. Empty sends every event.",
                "items": {
                  "type": "string"
                },
                "maxItems": 50,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Types"
          },
          "url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "minLength": 9,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A new https address.",
            "title": "Url"
          }
        },
        "title": "WebhookSubscriptionUpdate",
        "type": "object"
      },
      "YcCompanyOut": {
        "description": "A company on a verification link, as YC's directory lists it.",
        "properties": {
          "batch": {
            "description": "Its batch, like `W23`.",
            "title": "Batch",
            "type": "string"
          },
          "claimed": {
            "description": "Another LedgerIt account already took the YC offer with this company; claiming it again is refused with `yc_company_claimed`.",
            "title": "Claimed",
            "type": "boolean"
          },
          "directory_url": {
            "description": "Its page in YC's public directory. Pass it as `company` to `billing.set_yc_offer`.",
            "title": "Directory Url",
            "type": "string"
          },
          "name": {
            "description": "The company's name.",
            "title": "Name",
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The company's own site, when YC lists one.",
            "title": "Url"
          }
        },
        "required": [
          "name",
          "batch",
          "url",
          "directory_url",
          "claimed"
        ],
        "title": "YcCompanyOut",
        "type": "object"
      },
      "YcLinkCheckOut": {
        "description": "What a founder's verification link proves, read from Y Combinator.",
        "properties": {
          "companies": {
            "description": "The companies the founder chose to show. Empty when the link shows the batch only: claiming needs company details.",
            "items": {
              "$ref": "#/components/schemas/YcCompanyOut"
            },
            "title": "Companies",
            "type": "array"
          },
          "founder_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The founder's name as YC gives it.",
            "title": "Founder Name"
          },
          "verified": {
            "description": "Whether Y Combinator vouches for the link's holder.",
            "title": "Verified",
            "type": "boolean"
          }
        },
        "required": [
          "verified",
          "founder_name",
          "companies"
        ],
        "title": "YcLinkCheckOut",
        "type": "object"
      },
      "YcLinkIn": {
        "properties": {
          "verification_url": {
            "description": "A founder's YC verification link, `https://www.ycombinator.com/verify/<code>`, made at ycombinator.com/verify/manage with company details shown. Never logged or returned: it is the founder's proof.",
            "examples": [
              "https://www.ycombinator.com/verify/g9tduh1u2ffgb2b1"
            ],
            "pattern": "^(?:https?://)?(?:www\\.)?ycombinator\\.com/verify/([A-Za-z0-9]{1,64})/?$",
            "title": "Verification Url",
            "type": "string"
          }
        },
        "required": [
          "verification_url"
        ],
        "title": "YcLinkIn",
        "type": "object"
      },
      "YcOfferIn": {
        "properties": {
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which of the link's companies these books are for, by its `directory_url` from `billing.check_yc_link`. Needed only when the link names several; refused with `yc_company_required` otherwise.",
            "examples": [
              "https://www.ycombinator.com/companies/stackai"
            ],
            "title": "Company"
          },
          "verification_url": {
            "description": "A founder's YC verification link, `https://www.ycombinator.com/verify/<code>`, made at ycombinator.com/verify/manage with company details shown. Never logged or returned: it is the founder's proof.",
            "examples": [
              "https://www.ycombinator.com/verify/g9tduh1u2ffgb2b1"
            ],
            "pattern": "^(?:https?://)?(?:www\\.)?ycombinator\\.com/verify/([A-Za-z0-9]{1,64})/?$",
            "title": "Verification Url",
            "type": "string"
          }
        },
        "required": [
          "verification_url"
        ],
        "title": "YcOfferIn",
        "type": "object"
      },
      "YcOfferOut": {
        "properties": {
          "batch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Y Combinator batch the offer was claimed with, like `W26`, read from the founder's verification link; null when the offer came with a partner's link instead (see `referral`).",
            "title": "Batch"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The YC company the link named, as YC's directory lists it; null for a batch given before verification links (decision 0183) or a partner's referral.",
            "title": "Company Name"
          },
          "company_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The company's page in YC's public directory, `https://www.ycombinator.com/companies/<slug>`; null with `company_name`.",
            "title": "Company Url"
          },
          "starts_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The billing date the offer's first year starts on; null until a subscription carries it.",
            "title": "Starts At"
          },
          "verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When Y Combinator vouched for the link; null with `company_name`.",
            "title": "Verified At"
          },
          "year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which year of the offer it is now: 1 (Founder's price off), 2 (half of it off), or null before or after.",
            "title": "Year"
          }
        },
        "required": [
          "batch",
          "company_name",
          "company_url",
          "verified_at",
          "starts_at",
          "year"
        ],
        "title": "YcOfferOut",
        "type": "object"
      },
      "create": {
        "properties": {
          "event_id": {
            "anyOf": [
              {
                "description": "An id that starts with `txn_`.",
                "examples": [
                  "txn_01h455vb4pex5vsknk084sn02q"
                ],
                "type": "string",
                "x-id-prefix": "txn"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction it is for, when known.",
            "title": "Event Id"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "A receipt or invoice: a PDF or a photo.",
            "title": "File",
            "type": "string"
          },
          "kind": {
            "default": "receipt",
            "description": "`receipt` for proof of money that moved; `invoice` for a vendor's bill to enter, which is read for the bill form (`POST /documents/{document_id}/bill_reading`) and never matched to a transaction.",
            "enum": [
              "receipt",
              "invoice"
            ],
            "title": "Kind",
            "type": "string"
          },
          "source": {
            "default": "upload",
            "description": "`mobile` for a photo taken on a phone.",
            "enum": [
              "upload",
              "mobile"
            ],
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_documents.create",
        "type": "object"
      },
      "create_from_csv": {
        "properties": {
          "cutover_date": {
            "description": "The last day the old books cover.",
            "format": "date",
            "title": "Cutover Date",
            "type": "string"
          },
          "open_items": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The invoices, bills and credits still open on the cutover day, as CSV or Excel: `account` (the receivable or payable, by name or number), `party` and `amount`; `number`, `issued_on` and `due_on` are optional.",
            "title": "Open Items"
          },
          "trial_balance": {
            "contentMediaType": "application/octet-stream",
            "description": "The trial balance on the cutover day, as CSV or Excel: an `account` column and `debit` and `credit` columns (or one `balance` column, positive on the debit side); `number`, `type` and `cash` are optional.",
            "title": "Trial Balance",
            "type": "string"
          }
        },
        "required": [
          "trial_balance",
          "cutover_date"
        ],
        "title": "Body_migrations.create_from_csv",
        "type": "object"
      },
      "create_from_quickbooks": {
        "properties": {
          "account_list": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "QuickBooks Online's Account List report, exported to CSV: each account's type and number.",
            "title": "Account List"
          },
          "ap_aging": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "QuickBooks Online's A/P Aging Detail report, exported to CSV, as of the cutover day.",
            "title": "Ap Aging"
          },
          "ar_aging": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "QuickBooks Online's A/R Aging Detail report, exported to CSV, as of the cutover day.",
            "title": "Ar Aging"
          },
          "cutover_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last day the old books cover; the trial balance's own \"As of\" day when left out.",
            "title": "Cutover Date"
          },
          "trial_balance": {
            "contentMediaType": "application/octet-stream",
            "description": "QuickBooks Online's Trial Balance report, exported to CSV, as of the cutover day.",
            "title": "Trial Balance",
            "type": "string"
          }
        },
        "required": [
          "trial_balance"
        ],
        "title": "Body_migrations.create_from_quickbooks",
        "type": "object"
      },
      "create_from_xero": {
        "properties": {
          "ap_aging": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Xero's Aged Payables Detail report, exported to Excel or CSV, as at the cutover day.",
            "title": "Ap Aging"
          },
          "ar_aging": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Xero's Aged Receivables Detail report, exported to Excel or CSV, as at the cutover day.",
            "title": "Ar Aging"
          },
          "chart_of_accounts": {
            "anyOf": [
              {
                "contentMediaType": "application/octet-stream",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Xero's chart of accounts, exported to CSV: each account's code and type.",
            "title": "Chart Of Accounts"
          },
          "cutover_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The last day the old books cover; the trial balance's own \"As at\" day when left out.",
            "title": "Cutover Date"
          },
          "trial_balance": {
            "contentMediaType": "application/octet-stream",
            "description": "Xero's Trial Balance report, exported to Excel or CSV, as at the cutover day.",
            "title": "Trial Balance",
            "type": "string"
          }
        },
        "required": [
          "trial_balance"
        ],
        "title": "Body_migrations.create_from_xero",
        "type": "object"
      },
      "fastapi___compat__v2__Body_accounts__set_logo": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "A PNG, JPEG or WebP image, 1 MB at most and 32 pixels across at least.",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_accounts.set_logo",
        "type": "object"
      },
      "fastapi___compat__v2__Body_counterparties__set_logo": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "A PNG, JPEG or WebP image, 1 MB at most and 32 pixels across at least.",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_counterparties.set_logo",
        "type": "object"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Authenticate with an API key from Settings: `Authorization: Bearer ll_\u2026`. A key acts as the member who made it, in the books it was made in. Errors are `{\"error\": {\"type\", \"code\", \"message\", \"param\", \"request_id\"}}`; branch on `code`. Creating calls take an `Idempotency-Key`, so a retry never writes twice.",
    "summary": "The books of a venture-backed company, for scripts and agents.",
    "title": "LedgerIt API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/account_reviews": {
      "get": {
        "description": "Every account review of every close, newest first: the reviews being\nworked, and the record of each close before.",
        "operationId": "account_reviews.list",
        "parameters": [
          {
            "description": "Only the reviews of this month, like 2026-09.",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the reviews of this month, like 2026-09.",
              "title": "Period"
            }
          },
          {
            "description": "Only the reviews of this account.",
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the reviews of this account.",
              "title": "Account Id"
            }
          },
          {
            "description": "Only reviews in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "open",
                    "reviewed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only reviews in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountReviewPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List every account review of every close",
        "tags": [
          "account_reviews"
        ]
      },
      "post": {
        "description": "Review an account for a month's close, starting the month's close run\nif it has none. The ledger's balance at the month's end is read now.\nRefused with `account_not_reviewable` for a bank, card, header, income or\nexpense account, with `account_review_exists` when the close already\nreviews it, with `account_review_incomplete` when marked reviewed without\nits support, and with `period_closed` in a closed month.",
        "operationId": "account_reviews.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAccountReview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountReviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Review an account against its support for a month",
        "tags": [
          "account_reviews"
        ]
      }
    },
    "/v1/account_reviews/{review_id}": {
      "delete": {
        "description": "Take an account's review out of its month's close. Refused with\n`period_closed` once the month is closed: the review is then the record.",
        "operationId": "account_reviews.delete",
        "parameters": [
          {
            "in": "path",
            "name": "review_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_review_`.",
              "examples": [
                "gla_review_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Review Id",
              "type": "string",
              "x-id-prefix": "gla_review"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Take an account review out of its close",
        "tags": [
          "account_reviews"
        ]
      },
      "get": {
        "description": "One account review: both balances, the difference and the evidence.",
        "operationId": "account_reviews.get",
        "parameters": [
          {
            "in": "path",
            "name": "review_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_review_`.",
              "examples": [
                "gla_review_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Review Id",
              "type": "string",
              "x-id-prefix": "gla_review"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountReviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an account review",
        "tags": [
          "account_reviews"
        ]
      },
      "patch": {
        "description": "Change a review: enter the support's balance, say where it is, mark it\nreviewed or take that back. Every change reads the ledger's balance\nagain, and a reviewed review must still hold up. Refused with\n`account_review_incomplete` when it would not, and with `period_closed`\nonce the month is closed.",
        "operationId": "account_reviews.update",
        "parameters": [
          {
            "in": "path",
            "name": "review_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_review_`.",
              "examples": [
                "gla_review_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Review Id",
              "type": "string",
              "x-id-prefix": "gla_review"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountReviewChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountReviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change an account review or mark it reviewed",
        "tags": [
          "account_reviews"
        ]
      }
    },
    "/v1/accounts": {
      "get": {
        "description": "The chart of accounts as a tree, each account with its balance as of\n`as_of` (today by default), headers rolled up from the accounts under\nthem.",
        "operationId": "accounts.list",
        "parameters": [
          {
            "description": "Balances as of this date.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Balances as of this date.",
              "title": "As Of"
            }
          },
          {
            "in": "query",
            "name": "include_empty",
            "required": false,
            "schema": {
              "default": true,
              "title": "Include Empty",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChartOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the chart of accounts with balances",
        "tags": [
          "accounts"
        ]
      },
      "post": {
        "description": "Add an account to this entity's chart.\n\nThe code range has to match the type (`ACCOUNT_CODE_PREFIXES`): an expense\naccount numbered in the 4000s works perfectly until a report groups by\nprefix, and then it is revenue.",
        "operationId": "accounts.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add an account to the chart",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/accounts/{account_id}": {
      "get": {
        "description": "One account: its balance, where it sits in the chart, and what is under it.",
        "operationId": "accounts.get",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "description": "Balances as of this date.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Balances as of this date.",
              "title": "As Of"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an account",
        "tags": [
          "accounts"
        ]
      },
      "patch": {
        "description": "Rename an account, move it in the chart, or take it out of use and bring it back.\n\nA move puts it under another account of its own type, or at the top of\nits type. Nothing posted changes; the headers above its old place stop\ncounting it and the ones above its new place start. It is refused under\nitself, under anything that is under it, and under an account out of use.\n\nAn account with history is never deleted: taking it out of use stops\nanything new being filed or posted to it, and leaves what is there. It is\nrefused for an account the books cannot run without (retained earnings,\nsuspense and the other one-of-a-kind roles), for a header with accounts\nstill in use under it, and while a rule still files to it.",
        "operationId": "accounts.update",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rename an account, move it in the chart, or take it out of use",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/accounts/{account_id}/activity": {
      "get": {
        "description": "The account's register, oldest first, with a running balance.\n\nA header account's register is its whole subtree's.",
        "operationId": "accounts.list_activity",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "description": "First day. Defaults to 1 January of `until`'s year.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "First day. Defaults to 1 January of `until`'s year.",
              "title": "Since"
            }
          },
          {
            "description": "Last day. Defaults to today.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Last day. Defaults to today.",
              "title": "Until"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List an account's lines with a running balance",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/accounts/{account_id}/logo": {
      "delete": {
        "description": "Remove the logo uploaded for an account. It wears the mark of the\nintegration that feeds it again, or its type's icon when none does.\nRemoving a logo that is not there succeeds and changes nothing.",
        "operationId": "accounts.remove_logo",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Remove an account's uploaded logo",
        "tags": [
          "accounts"
        ]
      },
      "put": {
        "description": "Upload a logo for an account, replacing any uploaded before. It is\nshown instead of the mark of the integration that feeds it.\n\nThe image type is read from the bytes, not from the upload's declared\ntype: PNG, JPEG or WebP, never SVG. It is redrawn as a square PNG of\n128 pixels at most. Refused with `payload_too_large` over 1 MB and\n`unsupported_image` for anything else, or an image under 32 pixels.",
        "operationId": "accounts.set_logo",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/fastapi___compat__v2__Body_accounts__set_logo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Upload an account's logo",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/accounts/{account_id}/required_dimensions": {
      "get": {
        "description": "The dimensions every line on this account must name a value of.",
        "operationId": "accounts.get_required_dimensions",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequiredDimensionsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the dimensions every line on an account must name",
        "tags": [
          "accounts"
        ]
      },
      "put": {
        "description": "Set which dimensions every line on this account must name. Lines\nalready posted are not revisited; every line posted after is held to it,\nand refused with `dimension_required` without one.",
        "operationId": "accounts.set_required_dimensions",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequiredDimensionsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequiredDimensionsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set the dimensions every line on an account must name",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/accounts/{account_id}/tax_line": {
      "put": {
        "description": "Choose the line an account reports on, or send null to go back to its\ndefault. Refused with `unprocessable` for a line of the wrong part: a\nbalance-sheet account belongs on Schedule L.",
        "operationId": "accounts.set_tax_line",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `gla_`.",
              "examples": [
                "gla_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Account Id",
              "type": "string",
              "x-id-prefix": "gla"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountTaxLineIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountTaxLineOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Choose the tax line an account reports on",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/allocations": {
      "post": {
        "description": "Settle part or all of a debit item with a credit item of the same\nledger and party: a payment applied to an invoice on AR, to a bill on\nAP. Refused with `over_allocated` past what either has left, and\n`allocation_refused` for items that cannot be joined.",
        "operationId": "allocations.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Apply a payment to an invoice or bill",
        "tags": [
          "allocations"
        ]
      }
    },
    "/v1/allocations/{allocation_id}/reverse": {
      "post": {
        "description": "Undo an allocation with another for minus its amount. Both items have\nwhat it took back. An allocation a reversal entry made is undone by\nreversing that entry's reversal instead.",
        "operationId": "allocations.reverse",
        "parameters": [
          {
            "in": "path",
            "name": "allocation_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `alloc_`.",
              "examples": [
                "alloc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Allocation Id",
              "type": "string",
              "x-id-prefix": "alloc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Undo an allocation",
        "tags": [
          "allocations"
        ]
      }
    },
    "/v1/approvals": {
      "get": {
        "description": "Approvals asked for in these books, the newest first: what waits for\na decision, and what was decided.",
        "operationId": "approvals.list",
        "parameters": [
          {
            "description": "Only `pending`, `approved`, `rejected` or `cancelled` ones.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `pending`, `approved`, `rejected` or `cancelled` ones.",
              "title": "Status"
            }
          },
          {
            "description": "Only those of this subject (a payment's id).",
            "in": "query",
            "name": "subject_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id. Which resource it names is given by the field beside it.",
                  "examples": [
                    "je_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "*"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those of this subject (a payment's id).",
              "title": "Subject Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List approvals",
        "tags": [
          "approvals"
        ]
      }
    },
    "/v1/approvals/{approval_id}": {
      "get": {
        "description": "One approval: what it approves, who decided, and whether it stands.",
        "operationId": "approvals.get",
        "parameters": [
          {
            "in": "path",
            "name": "approval_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `appr_`.",
              "examples": [
                "appr_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Approval Id",
              "type": "string",
              "x-id-prefix": "appr"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an approval",
        "tags": [
          "approvals"
        ]
      }
    },
    "/v1/approvals/{approval_id}/decide": {
      "post": {
        "description": "Approve or reject, once. Needs `money.approve`, or an approval limit\nin the approval's currency that covers its amount (the Approver\nadd-on); anyone else is refused with `role`. An approval past its expiry\nis refused with `conflict`: ask for another. So is a change the\nassistant proposed, which its person decides in the conversation.",
        "operationId": "approvals.decide",
        "parameters": [
          {
            "in": "path",
            "name": "approval_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `appr_`.",
              "examples": [
                "appr_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Approval Id",
              "type": "string",
              "x-id-prefix": "appr"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalDecide"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Approve or reject",
        "tags": [
          "approvals"
        ]
      }
    },
    "/v1/audit_archive": {
      "get": {
        "description": "The archived segments of these books' audit trail, newest first \u2014\nthose whose bytes have landed. Each\nnames its hash and the hash of the one before, so the chain can be\nchecked against the files themselves.",
        "operationId": "audit_archive.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditArchiveSegmentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the archived segments of the audit trail",
        "tags": [
          "audit_archive"
        ]
      }
    },
    "/v1/audit_archive/{sequence}/link": {
      "get": {
        "description": "A short-lived link to read one segment of the archive.",
        "operationId": "audit_archive.link",
        "parameters": [
          {
            "in": "path",
            "name": "sequence",
            "required": true,
            "schema": {
              "title": "Sequence",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditArchiveLink"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a short-lived link to one archived segment",
        "tags": [
          "audit_archive"
        ]
      }
    },
    "/v1/audit_events": {
      "get": {
        "description": "The audit trail of these books, newest first: what happened, to what,\nand who decided. Narrow it to one record with `subject_type` and\n`subject_id` for that record's history, and to a stretch of time with\n`since` and `until`.",
        "operationId": "audit_events.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only what happened to records of this kind.",
            "in": "query",
            "name": "subject_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only what happened to records of this kind.",
              "title": "Subject Type"
            }
          },
          {
            "description": "Only what happened to this record. Give its kind too.",
            "in": "query",
            "name": "subject_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id. Which resource it names is given by the field beside it.",
                  "examples": [
                    "je_01h455vb4pex5vsknk084sn02q"
                  ],
                  "maxLength": 64,
                  "type": "string",
                  "x-id-prefix": "*"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only what happened to this record. Give its kind too.",
              "title": "Subject Id"
            }
          },
          {
            "description": "Only what a person, the system or a model did.",
            "in": "query",
            "name": "actor_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "system",
                    "model"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only what a person, the system or a model did.",
              "title": "Actor Kind"
            }
          },
          {
            "description": "Only this action, e.g. `entry.posted`.",
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this action, e.g. `entry.posted`.",
              "title": "Action"
            }
          },
          {
            "description": "Only what happened at or after this instant. No offset means UTC.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only what happened at or after this instant. No offset means UTC.",
              "title": "Since"
            }
          },
          {
            "description": "Only what happened before this instant. No offset means UTC.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only what happened before this instant. No offset means UTC.",
              "title": "Until"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditEventPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what was done to the books, and by whom",
        "tags": [
          "audit_events"
        ]
      }
    },
    "/v1/autonomy": {
      "delete": {
        "description": "Go back to the defaults. Admins and owners only; on the audit log.",
        "operationId": "autonomy.reset",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutonomyPolicyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Put the model's limits back to the defaults",
        "tags": [
          "autonomy"
        ]
      },
      "get": {
        "description": "The thresholds a model's category must pass to post without a person:\nconfidence, materiality, and a ceiling for counterparties the books have\nnever posted. Also the defaults and the limits nobody may go past.",
        "operationId": "autonomy.get",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutonomyPolicyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get how much a model may file without a person",
        "tags": [
          "autonomy"
        ]
      },
      "put": {
        "description": "Set all three thresholds. Admins and owners only; the change is on the\naudit log with the values before and after.",
        "operationId": "autonomy.set",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutonomyPolicyIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutonomyPolicyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set how much a model may file without a person",
        "tags": [
          "autonomy"
        ]
      }
    },
    "/v1/autonomy/versions": {
      "get": {
        "description": "Every policy these books have had, newest first: each change of the\nthresholds, and each reset to the defaults. Version 0, the shipped\ndefaults, is where every set of books starts and has no entry.",
        "operationId": "autonomy.list_versions",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutonomyVersionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List every policy these books have had",
        "tags": [
          "autonomy"
        ]
      }
    },
    "/v1/bank_statements": {
      "get": {
        "description": "Statements uploaded to these books, the newest first.",
        "operationId": "bank_statements.list",
        "parameters": [
          {
            "description": "Only this account's statements.",
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this account's statements.",
              "title": "Account Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List uploaded statements",
        "tags": [
          "bank_statements"
        ]
      }
    },
    "/v1/bank_statements/{statement_id}": {
      "delete": {
        "description": "Forget a statement uploaded by mistake. The transactions its lines were\nimported as stay in the books; reverse or exclude those on their own. A\nreconciled statement is refused with `statement_not_deletable`.",
        "operationId": "bank_statements.delete",
        "parameters": [
          {
            "in": "path",
            "name": "statement_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `stmt_`.",
              "examples": [
                "stmt_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Statement Id",
              "type": "string",
              "x-id-prefix": "stmt"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Forget a statement uploaded by mistake",
        "tags": [
          "bank_statements"
        ]
      },
      "get": {
        "description": "A statement with each line as the bank printed it and the transaction\nit was imported as.",
        "operationId": "bank_statements.get",
        "parameters": [
          {
            "in": "path",
            "name": "statement_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `stmt_`.",
              "examples": [
                "stmt_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Statement Id",
              "type": "string",
              "x-id-prefix": "stmt"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a statement and its lines",
        "tags": [
          "bank_statements"
        ]
      }
    },
    "/v1/bank_statements/{statement_id}/ledger_lines": {
      "get": {
        "description": "The ledger lines a statement's lines may still be matched to: posted\nto its account within four days of its dates, not reversed, and in no\nstanding match. The oldest first.",
        "operationId": "bank_statements.ledger_lines",
        "parameters": [
          {
            "in": "path",
            "name": "statement_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `stmt_`.",
              "examples": [
                "stmt_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Statement Id",
              "type": "string",
              "x-id-prefix": "stmt"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreeLedgerLineList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the ledger lines a statement can still be matched to",
        "tags": [
          "bank_statements"
        ]
      }
    },
    "/v1/bank_statements/{statement_id}/match": {
      "post": {
        "description": "Match the statement's lines to the ledger lines on its account: through\nthe transaction each line was imported as, then one for one by amount\nwithin four days, then batches of statement lines that are one ledger\nline, and statement lines split across several. Anything with more than\none candidate is left for a person. A statement whose every line is\nmatched is `reconciled`.",
        "operationId": "bank_statements.match",
        "parameters": [
          {
            "in": "path",
            "name": "statement_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `stmt_`.",
              "examples": [
                "stmt_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Statement Id",
              "type": "string",
              "x-id-prefix": "stmt"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchRunOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Match a statement to the ledger",
        "tags": [
          "bank_statements"
        ]
      }
    },
    "/v1/bill_inbox": {
      "get": {
        "description": "The address vendors send their bills to. Each PDF or photo attached to\nan email sent there, by anyone, becomes a vendor's invoice waiting to be\nentered as a bill.",
        "operationId": "bill_inbox.get",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillInboxOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the address vendors send bills to",
        "tags": [
          "bill_inbox"
        ]
      }
    },
    "/v1/bill_inbox/emails": {
      "get": {
        "description": "Emails sent to the bills address, newest first, with what became of\neach: kept, with how many bills it brought, or refused because nothing\nattached was a PDF or a photo.",
        "operationId": "bill_inbox.list_emails",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptEmailPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the emails sent to the bills address",
        "tags": [
          "bill_inbox"
        ]
      }
    },
    "/v1/bill_inbox/rotate": {
      "post": {
        "description": "Replace the bills address with a new one. The old one reaches nothing\nfrom now on: for an address that draws mail it should not.",
        "operationId": "bill_inbox.rotate",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillInboxOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Replace the bills address",
        "tags": [
          "bill_inbox"
        ]
      }
    },
    "/v1/billing": {
      "get": {
        "description": "The organization's plan, the monthly spend it is priced by, and its\nsubscription as of the last webhook from Stripe.",
        "operationId": "billing.get",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the plan, the monthly spend it is priced by, and the subscription",
        "tags": [
          "billing"
        ]
      }
    },
    "/v1/billing/checkout_sessions": {
      "post": {
        "description": "Start a paid plan: a Stripe Checkout page for the plan the monthly\nspend calls for, or a bigger one, with a line for each set of books\nbeyond the first. A YC company's page carries the offer. Refused with\n`plan_is_free` for Starter, `plan_below_spend` for a plan the spend is\nover, and `already_subscribed` while a subscription stands \u2014 change that\none through the portal instead.",
        "operationId": "billing.create_checkout_session",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CheckoutIn"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a paid plan on a Stripe Checkout page",
        "tags": [
          "billing"
        ]
      }
    },
    "/v1/billing/plans": {
      "get": {
        "description": "The price list: each plan's price, monthly and yearly, and the monthly\nspend it covers.",
        "operationId": "billing.list_plans",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanListOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the plans and their prices",
        "tags": [
          "billing"
        ]
      }
    },
    "/v1/billing/portal_sessions": {
      "post": {
        "description": "Open the Stripe customer portal: payment method, invoices, cancelling.",
        "operationId": "billing.create_portal_session",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Open the Stripe portal for the card, invoices or cancelling",
        "tags": [
          "billing"
        ]
      }
    },
    "/v1/billing/yc_offer": {
      "delete": {
        "description": "Take back the YC offer before it starts, with the verification behind\nit. Once a subscription carries it, it is refused with `yc_offer_started`.\nNaturally idempotent.",
        "operationId": "billing.remove_yc_offer",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Take back the YC offer before it starts",
        "tags": [
          "billing"
        ]
      },
      "put": {
        "description": "Claim the YC offer with a founder's verification link. LedgerIt reads\nthe link from Y Combinator: YC must vouch for the founder\n(`yc_link_invalid` otherwise), the link must show company details\n(`yc_company_hidden`), one company must be meant (`yc_company_required`\nwhen the link names several and `company` is not given), and that company\nmust not have the offer on another LedgerIt account already\n(`yc_company_claimed`). The batch is the company's. Before a paid plan,\ncheckout then applies the offer: Founder free for 12 months, then half\nprice for 12, or Founder's price off a bigger plan. On a paid plan already,\nthe offer starts on the next billing date. Naturally idempotent: the same\nlink twice is one offer. Once the offer has started, a different batch is\nrefused with `yc_offer_started`.",
        "operationId": "billing.set_yc_offer",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/YcOfferIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Claim the YC offer with a founder's verification link",
        "tags": [
          "billing"
        ]
      }
    },
    "/v1/billing/yc_offer/check": {
      "post": {
        "description": "Read a founder's YC verification link without claiming anything: whether\nY Combinator vouches for them, and the companies and batches the link\nshows, each marked when another LedgerIt account already took the offer\nwith it. A link YC does not know is refused with `yc_link_invalid`; when\nYC does not answer, `yc_unavailable`.",
        "operationId": "billing.check_yc_link",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/YcLinkIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/YcLinkCheckOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read a founder's YC verification link",
        "tags": [
          "billing"
        ]
      }
    },
    "/v1/bills": {
      "get": {
        "description": "The bills of these books, the newest first, each with what is still\nowed on it.",
        "operationId": "bills.list",
        "parameters": [
          {
            "description": "Only `draft`, `approved` or `void` bills.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `draft`, `approved` or `void` bills.",
              "title": "Status"
            }
          },
          {
            "description": "Only this vendor's bills.",
            "in": "query",
            "name": "party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this vendor's bills.",
              "title": "Party Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List bills",
        "tags": [
          "bills"
        ]
      },
      "post": {
        "description": "Write a draft of a vendor's bill. Nothing is on the books until it is\napproved. The vendor's number is taken once per vendor: the same number\nagain is refused with `conflict`, since it is the same bill entered\ntwice. It falls due on the vendor's terms (30 days without) when no due\nday is given.",
        "operationId": "bills.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Enter a draft bill",
        "tags": [
          "bills"
        ]
      }
    },
    "/v1/bills/{bill_id}": {
      "delete": {
        "description": "Delete a draft. An approved bill is refused with `conflict`: it is\nvoided instead, and stays.",
        "operationId": "bills.delete",
        "parameters": [
          {
            "in": "path",
            "name": "bill_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `bill_`.",
              "examples": [
                "bill_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Bill Id",
              "type": "string",
              "x-id-prefix": "bill"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a draft bill",
        "tags": [
          "bills"
        ]
      },
      "get": {
        "description": "One bill, its lines and what is still owed on it.",
        "operationId": "bills.get",
        "parameters": [
          {
            "in": "path",
            "name": "bill_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `bill_`.",
              "examples": [
                "bill_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Bill Id",
              "type": "string",
              "x-id-prefix": "bill"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a bill",
        "tags": [
          "bills"
        ]
      },
      "patch": {
        "description": "Change a draft: any field given, and every line at once when `lines`\nis. An approved bill is refused with `conflict`: void it and enter\nanother.",
        "operationId": "bills.update",
        "parameters": [
          {
            "in": "path",
            "name": "bill_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `bill_`.",
              "examples": [
                "bill_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Bill Id",
              "type": "string",
              "x-id-prefix": "bill"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a draft bill",
        "tags": [
          "bills"
        ]
      }
    },
    "/v1/bills/{bill_id}/approve": {
      "post": {
        "description": "Put a draft on the books: one entry on the bill's day, each line on its\naccount against the total on accounts payable naming the vendor. What is\nowed then ages from the bill's due day.",
        "operationId": "bills.approve",
        "parameters": [
          {
            "in": "path",
            "name": "bill_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `bill_`.",
              "examples": [
                "bill_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Bill Id",
              "type": "string",
              "x-id-prefix": "bill"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Approve a bill onto the books",
        "tags": [
          "bills"
        ]
      }
    },
    "/v1/bills/{bill_id}/comparison": {
      "get": {
        "description": "A bill beside what its vendor usually bills and beside its last bill,\naccount by account, so a price rise is questioned before the bill is\napproved or paid. The usual is the higher of the vendor's bills before\nthis one in the rhythm it kept when the bill came in; `above_usual` is\nset when the bill comes to at least 1.25 times it, the same rule as the\nupcoming bills report.",
        "operationId": "bills.compare",
        "parameters": [
          {
            "in": "path",
            "name": "bill_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `bill_`.",
              "examples": [
                "bill_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Bill Id",
              "type": "string",
              "x-id-prefix": "bill"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillComparisonOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Compare a bill with its vendor's usual and last bill",
        "tags": [
          "bills"
        ]
      }
    },
    "/v1/bills/{bill_id}/send_back": {
      "post": {
        "description": "Undo LedgerIt's approval of a bill: its entry is reversed and it is a\ndraft again, its number, lines and document as they were, to check,\nchange and approve. Only a bill LedgerIt approved (`approved_by_ledgerit`);\nany other is refused with `conflict`, as is one with a payment applied.",
        "operationId": "bills.send_back",
        "parameters": [
          {
            "in": "path",
            "name": "bill_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `bill_`.",
              "examples": [
                "bill_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Bill Id",
              "type": "string",
              "x-id-prefix": "bill"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send a bill LedgerIt approved back to draft",
        "tags": [
          "bills"
        ]
      }
    },
    "/v1/bills/{bill_id}/void": {
      "post": {
        "description": "Take an approved bill off the books by reversing its entry. Refused\nwith `conflict` while a payment is applied to it.",
        "operationId": "bills.void",
        "parameters": [
          {
            "in": "path",
            "name": "bill_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `bill_`.",
              "examples": [
                "bill_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Bill Id",
              "type": "string",
              "x-id-prefix": "bill"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillVoid"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Void an approved bill",
        "tags": [
          "bills"
        ]
      }
    },
    "/v1/board_packs": {
      "get": {
        "description": "Every board pack, the newest first: one for each close of each month,\na reopened month's earlier packs kept as they were sent.",
        "operationId": "board_packs.list",
        "parameters": [
          {
            "description": "Only the packs of this month, like 2026-09.",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the packs of this month, like 2026-09.",
              "title": "Period"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardPackPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List board packs",
        "tags": [
          "board_packs"
        ]
      },
      "post": {
        "description": "Make the board pack of a closed month whose close has none: one closed\nbefore board packs existed. Its figures are read through the sequence\nthat close signed off, and kept. Closing a month makes its pack without\nthis. Refused with `period_not_closed` for a month that is open or\nreopened, and with `board_pack_exists` when the close already has one.",
        "operationId": "board_packs.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBoardPack"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardPackDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Make the board pack of a month closed before packs existed",
        "tags": [
          "board_packs"
        ]
      }
    },
    "/v1/board_packs/{pack_id}": {
      "delete": {
        "description": "Delete a pack and its commentary. The reports its close kept stay, and\n`POST` makes the pack again from them.",
        "operationId": "board_packs.delete",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `board_pack_`.",
              "examples": [
                "board_pack_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Pack Id",
              "type": "string",
              "x-id-prefix": "board_pack"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a board pack's commentary",
        "tags": [
          "board_packs"
        ]
      },
      "get": {
        "description": "A board pack: the month's figures, its balance sheet, income statement\nand cash flow statement as its close kept them, and the commentary.",
        "operationId": "board_packs.get",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `board_pack_`.",
              "examples": [
                "board_pack_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Pack Id",
              "type": "string",
              "x-id-prefix": "board_pack"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardPackDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a board pack with its figures and statements",
        "tags": [
          "board_packs"
        ]
      },
      "patch": {
        "description": "Write a pack's commentary. Its figures cannot change: they are what its\nclose kept.",
        "operationId": "board_packs.update",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `board_pack_`.",
              "examples": [
                "board_pack_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Pack Id",
              "type": "string",
              "x-id-prefix": "board_pack"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoardPackChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardPackOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Write a board pack's commentary",
        "tags": [
          "board_packs"
        ]
      }
    },
    "/v1/books/archive": {
      "get": {
        "description": "Everything these books hold, as one JSON archive: the chart of\naccounts, dimensions, counterparties and every journal entry with its\nlines, in the order they were posted, with the trial balance they add up\nto and a checksum. Counterparties' tax IDs are included whole only for a\ncaller with the sensitive-data permission. `POST /v1/books/restore`\nwrites it into empty books.",
        "operationId": "books.export",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooksArchive-Output"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Export everything the books hold",
        "tags": [
          "books"
        ]
      }
    },
    "/v1/books/autonomy": {
      "get": {
        "description": "Per month: the economic events, the share decided with no person,\na person's interventions per 1,000 events (all, founders, accountants),\nhow often a person kept the model's category, and the questions asked.\n\nOperational figures read as the rows stand now, not pinned to a posting\nsequence: a month's figures still move while its work is being done.",
        "operationId": "books.autonomy",
        "parameters": [
          {
            "description": "The last month to cover, as `YYYY-MM`. Defaults to the current month.",
            "in": "query",
            "name": "through",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The last month to cover, as `YYYY-MM`. Defaults to the current month.",
              "title": "Through"
            }
          },
          {
            "description": "How many months to cover, ending with `through`.",
            "in": "query",
            "name": "months",
            "required": false,
            "schema": {
              "default": 6,
              "description": "How many months to cover, ending with `through`.",
              "maximum": 24,
              "minimum": 1,
              "title": "Months",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooksAutonomyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Measure how much of the books' work ran without a person",
        "tags": [
          "books"
        ]
      }
    },
    "/v1/books/checks": {
      "get": {
        "description": "What the books check every day, while the month is open, and the\nthresholds each finding is held to. Each finding is an Inbox item of the\ncheck's kind; the checks only read the books, and never change them.",
        "operationId": "books.checks",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooksCheckList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what the books check every day, and the thresholds",
        "tags": [
          "books"
        ]
      }
    },
    "/v1/books/digest": {
      "get": {
        "description": "This week's \"Your books\" digest: last month closed or how ready it is,\nthis month's readiness and what only you can answer, how much of last\nmonth ran without a person, cash and runway, and what the daily checks\nfound that we are reviewing.\n\nComputed as the books stand now, on the company's clock. The digest is\nsent to every member on Monday in the company's time zone, once a week;\n`sent_at` says whether this week's has gone out.",
        "operationId": "books.digest",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooksDigestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read this week's digest of the books",
        "tags": [
          "books"
        ]
      }
    },
    "/v1/books/readiness": {
      "get": {
        "description": "How ready a month is to close, area by area: cash, cards, payroll,\nrevenue, receivables and payables, schedules, documents, questions and\ntransactions, each ready, in attention or not applicable, with how many\nitems wait and on whom. The percentage counts the month's work done; the\nblockers are the close screen's own, so a month at 100% has nothing left\nbut the order and the date to wait for.\n\nRead-only, and open to viewers: it creates no period and raises no\nexception.",
        "operationId": "books.readiness",
        "parameters": [
          {
            "description": "The month, as `2026-09`. The current month when absent.",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The month, as `2026-09`. The current month when absent.",
              "title": "Period"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooksReadinessOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Say how ready a month is to close, area by area",
        "tags": [
          "books"
        ]
      }
    },
    "/v1/books/restore": {
      "post": {
        "description": "Write an archive from `GET /v1/books/archive` into these books, which\nmust hold no journal entry yet and keep the archive's currency. The chart,\ndimensions and counterparties come first (an account these books already\nhave by the same code is made to match, and must be of the same type),\nthen every entry in its order, held to every rule a new entry is, and\nlast a check that the books match the archive's trial balance.\n\nEverything that can refuse an archive is checked before anything is\nwritten, including that its entries add up to its own trial balance:\n`unprocessable` for an archive that does not hold together, `conflict`\nfor books that already hold other entries. Entries are written in\ncommitted parts of 1,000; if a restore is cut off, send the same archive\nagain and it carries on after the last entry written. A large archive\ntakes minutes, so give the call a long timeout.",
        "operationId": "books.restore",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BooksArchive-Input"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoreOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Restore an archive into empty books",
        "tags": [
          "books"
        ]
      }
    },
    "/v1/budgets": {
      "get": {
        "description": "The books' budgets, the newest first, with what each budgets for\nincome and expense.",
        "operationId": "budgets.list",
        "parameters": [
          {
            "description": "Only this fiscal year's budgets.",
            "in": "query",
            "name": "fiscal_year",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this fiscal year's budgets.",
              "title": "Fiscal Year"
            }
          },
          {
            "description": "Only this scenario.",
            "in": "query",
            "name": "scenario",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "base",
                    "upside",
                    "downside"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this scenario.",
              "title": "Scenario"
            }
          },
          {
            "description": "Only budgets in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "draft",
                    "current",
                    "superseded"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only budgets in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List budgets",
        "tags": [
          "budgets"
        ]
      },
      "post": {
        "description": "Start a budget for a fiscal year and scenario: blank, copied from\nanother budget, or from last year's actuals.\n\nIt is the next version of its year and scenario. The first one is made\ncurrent; later ones are drafts until made current. Refused with\n`budget_terms` for a budget to copy that is not in these books.",
        "operationId": "budgets.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a budget",
        "tags": [
          "budgets"
        ]
      }
    },
    "/v1/budgets/{budget_id}": {
      "delete": {
        "description": "Delete a draft or superseded budget and its lines. Refused with\n`budget_frozen` for the current version: make another current first.",
        "operationId": "budgets.delete",
        "parameters": [
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `budget_`.",
              "examples": [
                "budget_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Budget Id",
              "type": "string",
              "x-id-prefix": "budget"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a budget that is not current",
        "tags": [
          "budgets"
        ]
      },
      "get": {
        "description": "A budget with every budgeted cell: an amount per account, department\nand month.",
        "operationId": "budgets.get",
        "parameters": [
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `budget_`.",
              "examples": [
                "budget_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Budget Id",
              "type": "string",
              "x-id-prefix": "budget"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a budget and its lines",
        "tags": [
          "budgets"
        ]
      },
      "patch": {
        "description": "Rename a budget or change its memo. Refused with `budget_frozen` for a\nsuperseded version.",
        "operationId": "budgets.update",
        "parameters": [
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `budget_`.",
              "examples": [
                "budget_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Budget Id",
              "type": "string",
              "x-id-prefix": "budget"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rename a budget",
        "tags": [
          "budgets"
        ]
      }
    },
    "/v1/budgets/{budget_id}/lines": {
      "put": {
        "description": "Replace every line of a budget with these: what saving the grid does.\n\nEach line is one month's amount for an income or expense account, a\ndepartment, or both, once per account, department and month. Refused with\n`budget_terms` for a month outside the budget or an account that is not a\npostable P&L account, `budget_frozen` for a superseded version, and\n`budget_changed` when `expected_row_version` is stale.",
        "operationId": "budgets.set_lines",
        "parameters": [
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `budget_`.",
              "examples": [
                "budget_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Budget Id",
              "type": "string",
              "x-id-prefix": "budget"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetLinesIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set a budget's lines",
        "tags": [
          "budgets"
        ]
      }
    },
    "/v1/budgets/{budget_id}/make_current": {
      "post": {
        "description": "Make a draft the current version of its year and scenario. The\nversion it replaces is superseded and no longer changes. Refused with\n`budget_frozen` for a superseded version.",
        "operationId": "budgets.make_current",
        "parameters": [
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `budget_`.",
              "examples": [
                "budget_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Budget Id",
              "type": "string",
              "x-id-prefix": "budget"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Make a budget version current",
        "tags": [
          "budgets"
        ]
      }
    },
    "/v1/budgets/{budget_id}/versions": {
      "post": {
        "description": "A new draft version of a budget's year and scenario, with its lines:\na reforecast. It stays a draft until made current.",
        "operationId": "budgets.new_version",
        "parameters": [
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `budget_`.",
              "examples": [
                "budget_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Budget Id",
              "type": "string",
              "x-id-prefix": "budget"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewVersionIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a new version of a budget",
        "tags": [
          "budgets"
        ]
      }
    },
    "/v1/budgets/{budget_id}/vs_actual": {
      "get": {
        "description": "Budget vs. actual: each month's budget beside what the ledger says\nhappened, closing entries left out as on the income statement.\n\nRows are the budget's accounts, their parts by department, and every\nother P&L account with actuals. Totals and variances run through\n`actual_through`, so a month still to come does not count as under budget.",
        "operationId": "budgets.vs_actual",
        "parameters": [
          {
            "in": "path",
            "name": "budget_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `budget_`.",
              "examples": [
                "budget_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Budget Id",
              "type": "string",
              "x-id-prefix": "budget"
            }
          },
          {
            "description": "Count actuals through this day; today if not given.",
            "in": "query",
            "name": "through",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Count actuals through this day; today if not given.",
              "title": "Through"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetComparisonOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Compare a budget with actuals",
        "tags": [
          "budgets"
        ]
      }
    },
    "/v1/cardholder_contacts": {
      "get": {
        "description": "The addresses the books were given for cardholders, the newest first.",
        "operationId": "cardholder_contacts.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderContactPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List cardholders' addresses",
        "tags": [
          "cardholder_contacts"
        ]
      },
      "post": {
        "description": "Give the address of a cardholder the card program names without one.\nTheir missing receipts are asked of them from then on. One per name:\na name the books already have is refused (409).",
        "operationId": "cardholder_contacts.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardholderContactCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderContactOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Give a cardholder's address",
        "tags": [
          "cardholder_contacts"
        ]
      }
    },
    "/v1/cardholder_contacts/{contact_id}": {
      "delete": {
        "description": "Forget a cardholder's address. Their next missing receipt waits on the\nowner again.",
        "operationId": "cardholder_contacts.delete",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_`.",
              "examples": [
                "cardholder_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Contact Id",
              "type": "string",
              "x-id-prefix": "cardholder"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Forget a cardholder's address",
        "tags": [
          "cardholder_contacts"
        ]
      },
      "get": {
        "description": "One cardholder's address.",
        "operationId": "cardholder_contacts.get",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_`.",
              "examples": [
                "cardholder_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Contact Id",
              "type": "string",
              "x-id-prefix": "cardholder"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderContactOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a cardholder's address",
        "tags": [
          "cardholder_contacts"
        ]
      },
      "patch": {
        "description": "Change a cardholder's name or address. Requests already sent keep\nthe address they went to.",
        "operationId": "cardholder_contacts.update",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_`.",
              "examples": [
                "cardholder_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Contact Id",
              "type": "string",
              "x-id-prefix": "cardholder"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardholderContactUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderContactOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a cardholder's address",
        "tags": [
          "cardholder_contacts"
        ]
      }
    },
    "/v1/cardholder_identities": {
      "get": {
        "description": "The people the card programs name, newest first, each with the member\nof these books they are when that is known.",
        "operationId": "cardholder_identities.list",
        "parameters": [
          {
            "description": "Only this card program's people.",
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this card program's people.",
              "title": "Source"
            }
          },
          {
            "description": "`true`: only those linked to a member; `false`: only those not.",
            "in": "query",
            "name": "linked",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`true`: only those linked to a member; `false`: only those not.",
              "title": "Linked"
            }
          },
          {
            "description": "Only those linked to this member.",
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `usr_`.",
                  "examples": [
                    "usr_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "usr"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those linked to this member.",
              "title": "User Id"
            }
          },
          {
            "description": "Only the people the caller might be and nobody has placed yet: what the Inbox asks them about once (\"Is this you on Brex?\"). One page, of at most `limit`.",
            "in": "query",
            "name": "suggested",
            "required": false,
            "schema": {
              "default": false,
              "description": "Only the people the caller might be and nobody has placed yet: what the Inbox asks them about once (\"Is this you on Brex?\"). One page, of at most `limit`.",
              "title": "Suggested",
              "type": "boolean"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderIdentityPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the people card programs name",
        "tags": [
          "cardholder_identities"
        ]
      },
      "post": {
        "description": "Tell the books about a person a card program names before a sync has,\nby the program's id for them, and which member they are. A sync adds\nevery person it sees on its own; one the books know already is refused\n(409).",
        "operationId": "cardholder_identities.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardholderIdentityCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderIdentityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a person a card program names",
        "tags": [
          "cardholder_identities"
        ]
      }
    },
    "/v1/cardholder_identities/{identity_id}": {
      "delete": {
        "description": "Forget a person and their link. The next sync that sees them named\nknows them again by name and address, without the link.",
        "operationId": "cardholder_identities.delete",
        "parameters": [
          {
            "in": "path",
            "name": "identity_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_identity_`.",
              "examples": [
                "cardholder_identity_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Identity Id",
              "type": "string",
              "x-id-prefix": "cardholder_identity"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Forget a person a card program names",
        "tags": [
          "cardholder_identities"
        ]
      },
      "get": {
        "description": "One person a card program names, and the member they are.",
        "operationId": "cardholder_identities.get",
        "parameters": [
          {
            "in": "path",
            "name": "identity_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_identity_`.",
              "examples": [
                "cardholder_identity_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Identity Id",
              "type": "string",
              "x-id-prefix": "cardholder_identity"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderIdentityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a person a card program names",
        "tags": [
          "cardholder_identities"
        ]
      },
      "patch": {
        "description": "Say which member a person is (`user_id`), or that the books do not\nknow (null). Their open missing receipts go to that member, who uploads\nthem in the app. A name or address given here stands until the card\nprogram says otherwise.",
        "operationId": "cardholder_identities.update",
        "parameters": [
          {
            "in": "path",
            "name": "identity_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_identity_`.",
              "examples": [
                "cardholder_identity_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Identity Id",
              "type": "string",
              "x-id-prefix": "cardholder_identity"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardholderIdentityUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderIdentityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Link a card program's person to a member",
        "tags": [
          "cardholder_identities"
        ]
      }
    },
    "/v1/cardholder_identities/{identity_id}/claim": {
      "post": {
        "description": "\"It's me\": the caller says they are this person. Kept for good,\nso they are not asked again, and their missing receipts become theirs to\nupload. Claiming again changes nothing; a person someone else claimed\nis refused (409). A \"Not me\" the caller said about them is taken back.",
        "operationId": "cardholder_identities.claim",
        "parameters": [
          {
            "in": "path",
            "name": "identity_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_identity_`.",
              "examples": [
                "cardholder_identity_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Identity Id",
              "type": "string",
              "x-id-prefix": "cardholder_identity"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderIdentityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Say a card program's person is you",
        "tags": [
          "cardholder_identities"
        ]
      }
    },
    "/v1/cardholder_identities/{identity_id}/not_me": {
      "delete": {
        "description": "Take back the caller's \"Not me\" about this person: they may be asked\n\"Is this you?\" again. Taking back one never said changes nothing.",
        "operationId": "cardholder_identities.undo_not_me",
        "parameters": [
          {
            "in": "path",
            "name": "identity_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_identity_`.",
              "examples": [
                "cardholder_identity_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Identity Id",
              "type": "string",
              "x-id-prefix": "cardholder_identity"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderIdentityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Take back saying a card program's person is not you",
        "tags": [
          "cardholder_identities"
        ]
      },
      "post": {
        "description": "\"Not me\": the caller says they are not this person. Kept for good, so\nthey are not asked about them again; saying it twice changes nothing. A\nlink to the caller is taken back. The person's missing receipts go on to\nwhoever else might be them, or to the founder, who is asked for an\naddress. `DELETE` on the same path takes it back.",
        "operationId": "cardholder_identities.not_me",
        "parameters": [
          {
            "in": "path",
            "name": "identity_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cardholder_identity_`.",
              "examples": [
                "cardholder_identity_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Identity Id",
              "type": "string",
              "x-id-prefix": "cardholder_identity"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardholderIdentityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Say a card program's person is not you",
        "tags": [
          "cardholder_identities"
        ]
      }
    },
    "/v1/close_runs": {
      "get": {
        "description": "Every close of every month, newest first: the run being worked, and the\nrecord of each close before it.",
        "operationId": "close_runs.list",
        "parameters": [
          {
            "description": "Only the runs of this month, like 2026-09.",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the runs of this month, like 2026-09.",
              "title": "Period"
            }
          },
          {
            "description": "Only runs in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "open",
                    "closed",
                    "reopened"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only runs in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseRunPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List every close of every month",
        "tags": [
          "close_runs"
        ]
      }
    },
    "/v1/close_runs/{run_id}": {
      "get": {
        "description": "One close of one month, with its tasks: who signed each off, when, and\nwhat they wrote beside it.",
        "operationId": "close_runs.get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `close_run_`.",
              "examples": [
                "close_run_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Run Id",
              "type": "string",
              "x-id-prefix": "close_run"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseRunOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a close run and its tasks",
        "tags": [
          "close_runs"
        ]
      }
    },
    "/v1/close_tasks": {
      "get": {
        "description": "The tasks every month's close asks for, in the order they were written \u2014\nwhich is the order a month's checklist lists them in.",
        "operationId": "close_tasks.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseTaskPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the close checklist's tasks",
        "tags": [
          "close_tasks"
        ]
      },
      "post": {
        "description": "Add a task to the close checklist. Every open month's close asks for it\nfrom now on, and none of them can close until it is signed off (or the\nclose is forced) when it blocks. Closed months are not changed.",
        "operationId": "close_tasks.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewCloseTask"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseTaskOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a task to the close checklist",
        "tags": [
          "close_tasks"
        ]
      }
    },
    "/v1/close_tasks/{task_id}": {
      "delete": {
        "description": "Remove a task from the checklist and from every open month's close,\nsign-off and all. A closed month's record of it stays, under the title it\nhad.",
        "operationId": "close_tasks.delete",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Task Id",
              "type": "string",
              "x-id-prefix": "task"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Remove a task from the close checklist",
        "tags": [
          "close_tasks"
        ]
      },
      "get": {
        "description": "One task of the close checklist.",
        "operationId": "close_tasks.get",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Task Id",
              "type": "string",
              "x-id-prefix": "task"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseTaskOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a close task",
        "tags": [
          "close_tasks"
        ]
      },
      "patch": {
        "description": "Change a task: rename it, hand it to someone else, move its due day,\nsay whether the close waits on it or what it is done after. Every open\nmonth's close changes with it; a closed month keeps the task as it was.",
        "operationId": "close_tasks.update",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Task Id",
              "type": "string",
              "x-id-prefix": "task"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseTaskChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseTaskOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a close task",
        "tags": [
          "close_tasks"
        ]
      }
    },
    "/v1/comments": {
      "get": {
        "description": "Comments, oldest first: one record's discussion, or every one in the\nbooks.",
        "operationId": "comments.list",
        "parameters": [
          {
            "description": "What the comments are on.",
            "in": "query",
            "name": "about",
            "required": false,
            "schema": {
              "default": "transaction",
              "description": "What the comments are on.",
              "enum": [
                "transaction",
                "journal_entry"
              ],
              "title": "About",
              "type": "string"
            }
          },
          {
            "description": "One record's comments; all of them when absent.",
            "in": "query",
            "name": "subject_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id. Which resource it names is given by the field beside it.",
                  "examples": [
                    "je_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "*"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One record's comments; all of them when absent.",
              "title": "Subject Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List comments on records",
        "tags": [
          "comments"
        ]
      },
      "post": {
        "description": "Comment on a record. The members it mentions are told.\n\nWith `proposed_account_id`, the comment proposes the GL account a\ntransaction belongs in: for a member, who cannot post, to say where\nsomething goes. The account is held to what filing would take, the\npeople who may post are told, and the proposal leads the transaction's\nsuggestions until the comment is resolved. Nothing is filed.",
        "operationId": "comments.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewComment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Comment on a record",
        "tags": [
          "comments"
        ]
      }
    },
    "/v1/comments/{comment_id}": {
      "delete": {
        "description": "Delete a comment you wrote.",
        "operationId": "comments.delete",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cmt_`.",
              "examples": [
                "cmt_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Comment Id",
              "type": "string",
              "x-id-prefix": "cmt"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a comment you wrote",
        "tags": [
          "comments"
        ]
      },
      "patch": {
        "description": "Change a comment's words (its author only), or mark the matter\nsettled or open again (anyone who may write).",
        "operationId": "comments.update",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cmt_`.",
              "examples": [
                "cmt_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Comment Id",
              "type": "string",
              "x-id-prefix": "cmt"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a comment, or mark it settled",
        "tags": [
          "comments"
        ]
      }
    },
    "/v1/company": {
      "get": {
        "description": "The company behind these books: its legal name, address, what it is\nand what it came to LedgerIt to do, and whether its set-up is finished.",
        "operationId": "company.get",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the company behind these books",
        "tags": [
          "company"
        ]
      },
      "patch": {
        "description": "Change what is recorded about the company. Admins and owners only.\n\n`name` renames the books everywhere they are shown, and the organization\nwith them when it carries the same name.\n\nOnly the fields sent change. An EIN and \"no EIN yet\" exclude each other,\nso setting either clears the other; sending both is refused. The day the\nbooks start is the book's: a connection's first sync brings in nothing\ndated before it. A new company's books start the day it was\nincorporated, unless a start is sent.",
        "operationId": "company.update",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change what is recorded about the company",
        "tags": [
          "company"
        ]
      }
    },
    "/v1/connections": {
      "get": {
        "description": "The books' connections, oldest first, each with how it is doing: in\nplain words, against its freshness target, with any reauth deadline, how\nmuch of its history is in, and whether it may read the provider's people.",
        "operationId": "connections.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the books' connections",
        "tags": [
          "connections"
        ]
      }
    },
    "/v1/connections/{connection_id}": {
      "get": {
        "description": "One connection and how it is doing. Never its credentials.",
        "operationId": "connections.get",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `conn_`.",
              "examples": [
                "conn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Connection Id",
              "type": "string",
              "x-id-prefix": "conn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a connection and how it is doing",
        "tags": [
          "connections"
        ]
      }
    },
    "/v1/contributions": {
      "get": {
        "description": "The accounting work done in these books, newest first: who did what to\nwhich record. Narrow it to one person with `actor_id`, to a day with\n`on`, or to one record with `subject_type` and `subject_id`.",
        "operationId": "contributions.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only this member's work.",
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `usr_`.",
                  "examples": [
                    "usr_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "usr"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this member's work.",
              "title": "Actor Id"
            }
          },
          {
            "description": "Only a person's (`user`), the model's or the system's work.",
            "in": "query",
            "name": "actor_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "system",
                    "model"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only a person's (`user`), the model's or the system's work.",
              "title": "Actor Kind"
            }
          },
          {
            "description": "Only this kind of work.",
            "in": "query",
            "name": "contribution_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "transaction.categorized",
                    "transaction.classified",
                    "transaction.excluded",
                    "transaction.matched",
                    "transaction.reconciled",
                    "account.reconciled",
                    "journal_entry.posted",
                    "journal_entry.updated",
                    "journal_entry.reversed",
                    "rule.created",
                    "rule.updated",
                    "exception.resolved",
                    "close_task.completed",
                    "period.closed",
                    "period.locked",
                    "period.reopened",
                    "review.completed",
                    "ai_work.approved",
                    "ai_work.corrected",
                    "counterparty.created",
                    "counterparty.updated",
                    "data.imported",
                    "evidence.attached"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this kind of work.",
              "title": "Contribution Type"
            }
          },
          {
            "description": "Only this family of work.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "transactions",
                    "reconciliation",
                    "journal",
                    "close",
                    "review",
                    "rules",
                    "records"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this family of work.",
              "title": "Category"
            }
          },
          {
            "description": "Only work counted on this UTC day.",
            "in": "query",
            "name": "on",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only work counted on this UTC day.",
              "title": "On"
            }
          },
          {
            "description": "Only work on or after this UTC day.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only work on or after this UTC day.",
              "title": "Since"
            }
          },
          {
            "description": "Only work on or before this UTC day.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only work on or before this UTC day.",
              "title": "Until"
            }
          },
          {
            "description": "Only work on records of this kind.",
            "in": "query",
            "name": "subject_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only work on records of this kind.",
              "title": "Subject Type"
            }
          },
          {
            "description": "Only work on this record. Give its kind too.",
            "in": "query",
            "name": "subject_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id. Which resource it names is given by the field beside it.",
                  "examples": [
                    "je_01h455vb4pex5vsknk084sn02q"
                  ],
                  "maxLength": 64,
                  "type": "string",
                  "x-id-prefix": "*"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only work on this record. Give its kind too.",
              "title": "Subject Id"
            }
          },
          {
            "description": "`true` only what counts; `false` only repeats and undos; leave out for both.",
            "in": "query",
            "name": "counted",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`true` only what counts; `false` only repeats and undos; leave out for both.",
              "title": "Counted"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContributionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the accounting work done in the books, and by whom",
        "tags": [
          "contributions"
        ]
      }
    },
    "/v1/contributions/calendar": {
      "get": {
        "description": "A heatmap's days: how many contributions counted each day, every day\nof the range included. For one person with `actor_id`; for the whole\nbooks' people with `actor_kind=user`.",
        "operationId": "contributions.calendar",
        "parameters": [
          {
            "description": "Only this member's work.",
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `usr_`.",
                  "examples": [
                    "usr_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "usr"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this member's work.",
              "title": "Actor Id"
            }
          },
          {
            "description": "Only a person's (`user`), the model's or the system's work.",
            "in": "query",
            "name": "actor_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "system",
                    "model"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only a person's (`user`), the model's or the system's work.",
              "title": "Actor Kind"
            }
          },
          {
            "description": "The last day of the range, in UTC. Defaults to today.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The last day of the range, in UTC. Defaults to today.",
              "title": "Until"
            }
          },
          {
            "description": "How many days, ending `until`. Defaults to 365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 365,
              "description": "How many days, ending `until`. Defaults to 365.",
              "maximum": 373,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContributionCalendar"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get contributions per day, for a heatmap",
        "tags": [
          "contributions"
        ]
      }
    },
    "/v1/contributions/feed": {
      "get": {
        "description": "The books' activity feed: the same as `GET /contributions`, with work\ndone together \u2014 one request's bulk categorization, an hour of the\nmodel's \u2014 as one row. `limit` counts contributions, not rows; a group cut\nby the page carries the same `key` on the next one. For the model's\ncategorizations, each row says how many a person has since kept or\nchanged.",
        "operationId": "contributions.feed",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only this member's work.",
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `usr_`.",
                  "examples": [
                    "usr_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "usr"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this member's work.",
              "title": "Actor Id"
            }
          },
          {
            "description": "Only a person's (`user`), the model's or the system's work.",
            "in": "query",
            "name": "actor_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "system",
                    "model"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only a person's (`user`), the model's or the system's work.",
              "title": "Actor Kind"
            }
          },
          {
            "description": "Only this family of work.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "transactions",
                    "reconciliation",
                    "journal",
                    "close",
                    "review",
                    "rules",
                    "records"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this family of work.",
              "title": "Category"
            }
          },
          {
            "description": "Only work counted on this UTC day.",
            "in": "query",
            "name": "on",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only work counted on this UTC day.",
              "title": "On"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContributionFeed"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read the books' activity feed, work done together grouped",
        "tags": [
          "contributions"
        ]
      }
    },
    "/v1/contributions/stats": {
      "get": {
        "description": "What a profile says at a glance: the total, each kind of work, the\ndays active and the streaks, over the same range as the calendar.",
        "operationId": "contributions.stats",
        "parameters": [
          {
            "description": "Only this member's work.",
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `usr_`.",
                  "examples": [
                    "usr_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "usr"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this member's work.",
              "title": "Actor Id"
            }
          },
          {
            "description": "Only a person's (`user`), the model's or the system's work.",
            "in": "query",
            "name": "actor_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "system",
                    "model"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only a person's (`user`), the model's or the system's work.",
              "title": "Actor Kind"
            }
          },
          {
            "description": "The last day of the range, in UTC. Defaults to today.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The last day of the range, in UTC. Defaults to today.",
              "title": "Until"
            }
          },
          {
            "description": "How many days, ending `until`. Defaults to 365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 365,
              "description": "How many days, ending `until`. Defaults to 365.",
              "maximum": 373,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContributionStats"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a contributor's totals, streaks and kinds of work",
        "tags": [
          "contributions"
        ]
      }
    },
    "/v1/contributions/{contribution_id}": {
      "get": {
        "description": "One piece of work, with what it changed \u2014 the category before and\nafter, the journal lines written or taken back \u2014 and the records around\nit: the transaction, its entry, the account and the month.",
        "operationId": "contributions.get",
        "parameters": [
          {
            "in": "path",
            "name": "contribution_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `contrib_`.",
              "examples": [
                "contrib_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Contribution Id",
              "type": "string",
              "x-id-prefix": "contrib"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContributionDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get one contribution and what it changed",
        "tags": [
          "contributions"
        ]
      }
    },
    "/v1/counterparties": {
      "get": {
        "description": "Everyone money moved to or from, by name, with how many transactions\nname them and how much went each way. Ones merged into another are left\nout: they are that other one now.",
        "operationId": "counterparties.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only counterparties whose name contains this, ignoring case.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only counterparties whose name contains this, ignoring case.",
              "title": "Q"
            }
          },
          {
            "description": "Only those holding this role: customers, vendors, investors\u2026",
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "customer",
                    "vendor",
                    "employee",
                    "investor",
                    "lender",
                    "founder"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those holding this role: customers, vendors, investors\u2026",
              "title": "Role"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the counterparties with their activity",
        "tags": [
          "counterparties"
        ]
      },
      "post": {
        "description": "Add a counterparty no feed has named yet.\n\nRefused with `counterparty_conflict` when one by the same name exists\n(\"Acme, Inc.\" and \"Acme\" are the same name); edit that one instead.",
        "operationId": "counterparties.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewCounterparty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a counterparty",
        "tags": [
          "counterparties"
        ]
      }
    },
    "/v1/counterparties/{counterparty_id}": {
      "delete": {
        "description": "Remove a counterparty, and any merged into them. Their transactions\nstay in the books and name nobody; a later sync that sees the same\nmerchant adds them again.",
        "operationId": "counterparties.delete",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a counterparty",
        "tags": [
          "counterparties"
        ]
      },
      "get": {
        "description": "One counterparty, with their activity in these books. One that was\nmerged answers too, with `merged_into_id` naming where it went.",
        "operationId": "counterparties.get",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a counterparty",
        "tags": [
          "counterparties"
        ]
      },
      "patch": {
        "description": "Rename a counterparty, mark them a customer or vendor, or record their\nterms. A rename keeps the slug, so the next sync still finds them under\nthe name the bank prints.",
        "operationId": "counterparties.update",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CounterpartyChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a counterparty",
        "tags": [
          "counterparties"
        ]
      }
    },
    "/v1/counterparties/{counterparty_id}/logo": {
      "delete": {
        "description": "Remove the logo uploaded for a counterparty. They show the one found\non their website again, or their initials while there is none. Removing\nan upload that is not there succeeds and changes nothing.",
        "operationId": "counterparties.remove_logo",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Remove a counterparty's uploaded logo",
        "tags": [
          "counterparties"
        ]
      },
      "put": {
        "description": "Upload a logo for a counterparty, replacing any uploaded before. It is\nshown instead of the one found on their website, in these books only.\n\nThe image type is read from the bytes, not from the upload's declared\ntype: PNG, JPEG or WebP, never SVG. It is redrawn as a square PNG of\n128 pixels at most. Refused with `payload_too_large` over 1 MB and\n`unsupported_image` for anything else, or an image under 32 pixels.\nUploading the same image again changes nothing.",
        "operationId": "counterparties.set_logo",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/fastapi___compat__v2__Body_counterparties__set_logo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Upload a counterparty's logo",
        "tags": [
          "counterparties"
        ]
      }
    },
    "/v1/counterparties/{counterparty_id}/merge": {
      "post": {
        "description": "Merge a counterparty into another: one company the bank printed two\nways. Answers with the one kept.\n\nIts transactions, rules, provider ids and drafts move to the one kept,\nwhich becomes a customer or vendor if this one was and takes whatever this\none knew that it did not. This one stays as an alias: posted lines keep\nnaming it, the list leaves it out, and the next sync that prints its name\nfiles to the one kept. A merge is not undone.\n\nMerging again into the same one answers the same. Refused with\n`counterparty_not_mergeable` into itself, into one that was itself merged,\nor away from one with invoices, bills, payments, credit notes, open items,\npayment destinations or financing \u2014 merge the other way round.",
        "operationId": "counterparties.merge",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergeCounterparty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Merge a counterparty into another",
        "tags": [
          "counterparties"
        ]
      }
    },
    "/v1/counterparties/{counterparty_id}/months": {
      "get": {
        "description": "A counterparty's activity month by month: how many transactions, how\nmuch paid to them and how much received. The figures add up to the\ntotals on the counterparty.",
        "operationId": "counterparties.months",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterpartyMonthsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a counterparty's activity month by month",
        "tags": [
          "counterparties"
        ]
      }
    },
    "/v1/counterparties/{counterparty_id}/roles": {
      "get": {
        "description": "The roles a counterparty holds in these books, by role. A journal line\nmay name a counterparty only once it holds one (decision 0086).",
        "operationId": "party_roles.list",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartyRolePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the roles a counterparty holds",
        "tags": [
          "party_roles"
        ]
      },
      "post": {
        "description": "Give a counterparty a role in these books: make them an investor, a\nlender, a vendor. Giving the customer or vendor role marks them one.\n\nRefused with `conflict` when they hold it already (change that one), and\nwith `counterparty_merged` for one merged into another.",
        "operationId": "party_roles.create",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPartyRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartyRoleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Give a counterparty a role",
        "tags": [
          "party_roles"
        ]
      }
    },
    "/v1/counterparties/{counterparty_id}/roles/{role_id}": {
      "delete": {
        "description": "Take a role away. Lines already posted keep naming them; a new line\nnaming them needs them to hold some role. Removing the customer or vendor\nrole unmarks them as one.",
        "operationId": "party_roles.delete",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_role_`.",
              "examples": [
                "party_role_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Role Id",
              "type": "string",
              "x-id-prefix": "party_role"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Take a role away from a counterparty",
        "tags": [
          "party_roles"
        ]
      },
      "get": {
        "description": "One role a counterparty holds.",
        "operationId": "party_roles.get",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_role_`.",
              "examples": [
                "party_role_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Role Id",
              "type": "string",
              "x-id-prefix": "party_role"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartyRoleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a counterparty's role",
        "tags": [
          "party_roles"
        ]
      },
      "patch": {
        "description": "Record whether a vendor is paid on a 1099, and on which form. Turning\n1099 off clears the form.",
        "operationId": "party_roles.update",
        "parameters": [
          {
            "in": "path",
            "name": "counterparty_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_`.",
              "examples": [
                "party_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Counterparty Id",
              "type": "string",
              "x-id-prefix": "party"
            }
          },
          {
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `party_role_`.",
              "examples": [
                "party_role_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Role Id",
              "type": "string",
              "x-id-prefix": "party_role"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartyRoleChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartyRoleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a counterparty's role",
        "tags": [
          "party_roles"
        ]
      }
    },
    "/v1/credit_notes": {
      "get": {
        "description": "The credit notes of these books, the newest first, each with what it\nis applied to and what is left.",
        "operationId": "credit_notes.list",
        "parameters": [
          {
            "description": "Only `draft`, `issued` or `void` credit notes.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `draft`, `issued` or `void` credit notes.",
              "title": "Status"
            }
          },
          {
            "description": "Only this customer's credit notes.",
            "in": "query",
            "name": "party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this customer's credit notes.",
              "title": "Party Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNotePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List credit notes",
        "tags": [
          "credit_notes"
        ]
      },
      "post": {
        "description": "Write a draft credit note for a customer, for an invoice it corrects or\non its own. Nothing is on the books until it is issued.",
        "operationId": "credit_notes.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Write a draft credit note",
        "tags": [
          "credit_notes"
        ]
      }
    },
    "/v1/credit_notes/{credit_note_id}": {
      "delete": {
        "description": "Delete a draft. An issued credit note is voided instead.",
        "operationId": "credit_notes.delete",
        "parameters": [
          {
            "in": "path",
            "name": "credit_note_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cn_`.",
              "examples": [
                "cn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Credit Note Id",
              "type": "string",
              "x-id-prefix": "cn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a draft credit note",
        "tags": [
          "credit_notes"
        ]
      },
      "get": {
        "description": "One credit note, its lines, what it is applied to and what is left.",
        "operationId": "credit_notes.get",
        "parameters": [
          {
            "in": "path",
            "name": "credit_note_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cn_`.",
              "examples": [
                "cn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Credit Note Id",
              "type": "string",
              "x-id-prefix": "cn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a credit note",
        "tags": [
          "credit_notes"
        ]
      },
      "patch": {
        "description": "Change a draft. An issued credit note is refused with `conflict`.",
        "operationId": "credit_notes.update",
        "parameters": [
          {
            "in": "path",
            "name": "credit_note_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cn_`.",
              "examples": [
                "cn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Credit Note Id",
              "type": "string",
              "x-id-prefix": "cn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a draft credit note",
        "tags": [
          "credit_notes"
        ]
      }
    },
    "/v1/credit_notes/{credit_note_id}/apply": {
      "post": {
        "description": "Apply what is left of an issued credit note to the customer's\ninvoices: those listed, or the oldest first.",
        "operationId": "credit_notes.apply",
        "parameters": [
          {
            "in": "path",
            "name": "credit_note_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cn_`.",
              "examples": [
                "cn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Credit Note Id",
              "type": "string",
              "x-id-prefix": "cn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteApply"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Apply a credit note to invoices",
        "tags": [
          "credit_notes"
        ]
      }
    },
    "/v1/credit_notes/{credit_note_id}/issue": {
      "post": {
        "description": "Put a draft on the books: each line against the total off the\ncustomer's receivable. A credit note that corrects an invoice is applied\nto it at once, as far as the invoice is still open.",
        "operationId": "credit_notes.issue",
        "parameters": [
          {
            "in": "path",
            "name": "credit_note_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cn_`.",
              "examples": [
                "cn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Credit Note Id",
              "type": "string",
              "x-id-prefix": "cn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Issue a credit note onto the books",
        "tags": [
          "credit_notes"
        ]
      }
    },
    "/v1/credit_notes/{credit_note_id}/void": {
      "post": {
        "description": "Take an issued credit note off the books by reversing its entry.\nRefused with `conflict` while any of it is applied.",
        "operationId": "credit_notes.void",
        "parameters": [
          {
            "in": "path",
            "name": "credit_note_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `cn_`.",
              "examples": [
                "cn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Credit Note Id",
              "type": "string",
              "x-id-prefix": "cn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteVoid"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Void an issued credit note",
        "tags": [
          "credit_notes"
        ]
      }
    },
    "/v1/detected_sources": {
      "get": {
        "description": "The sources the books' own lines name \u2014 a Stripe payout, a Gusto\ndebit \u2014 each with how often, what moved through it and its newest lines,\nnewest first. An `open` one is a suggestion to connect.",
        "operationId": "detected_sources.list",
        "parameters": [
          {
            "description": "Only sources in this state: `open`, `dismissed` or `connected`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only sources in this state: `open`, `dismissed` or `connected`.",
              "title": "Status"
            }
          },
          {
            "description": "Only sources of this kind.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only sources of this kind.",
              "title": "Kind"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedSourcePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the sources the books' lines name",
        "tags": [
          "detected_sources"
        ]
      }
    },
    "/v1/detected_sources/scan": {
      "post": {
        "description": "Read the last year of lines again for the sources they name. Every\nsync and upload already does this for what it brings in, and a daily\nsweep does it for every set of books; this is for now. Safe to repeat: a\nline is evidence of a source once.",
        "operationId": "detected_sources.scan",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedSourceScanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read the books' lines again for sources",
        "tags": [
          "detected_sources"
        ]
      }
    },
    "/v1/detected_sources/{source_id}": {
      "get": {
        "description": "One source the lines name, with its newest lines.",
        "operationId": "detected_sources.get",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `detected_source_`.",
              "examples": [
                "detected_source_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Source Id",
              "type": "string",
              "x-id-prefix": "detected_source"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedSourceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a source the books' lines name",
        "tags": [
          "detected_sources"
        ]
      },
      "patch": {
        "description": "Dismiss a suggestion (`status: dismissed`): the books do not use the\nsource, or do not want it read, and it is not suggested again. `open`\ntakes that back; a dismissed source whose provider is connected comes\nback as `connected`. Setting `connected` by hand is refused (422): connect\nthe provider instead.",
        "operationId": "detected_sources.update",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `detected_source_`.",
              "examples": [
                "detected_source_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Source Id",
              "type": "string",
              "x-id-prefix": "detected_source"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetectedSourceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedSourceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Dismiss or restore a suggested source",
        "tags": [
          "detected_sources"
        ]
      }
    },
    "/v1/dimensions": {
      "get": {
        "description": "Every dimension these books slice by, by key.",
        "operationId": "dimensions.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the dimensions the books slice by",
        "tags": [
          "dimensions"
        ]
      },
      "post": {
        "description": "Add a dimension to slice the books by.\n\nRefused with `dimension_conflict` when these books already have one with\nthe same key.",
        "operationId": "dimensions.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDimension"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a dimension",
        "tags": [
          "dimensions"
        ]
      }
    },
    "/v1/dimensions/{dimension_id}": {
      "delete": {
        "description": "Remove a dimension, its values and every account's requirement of it.\n\nRefused with `dimension_in_use` once a posted line names it: posted lines\nkeep their dimensions.",
        "operationId": "dimensions.delete",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a dimension no posted line names",
        "tags": [
          "dimensions"
        ]
      },
      "get": {
        "description": "One dimension.",
        "operationId": "dimensions.get",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a dimension",
        "tags": [
          "dimensions"
        ]
      },
      "patch": {
        "description": "Rename a dimension. Its key never changes.",
        "operationId": "dimensions.update",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DimensionChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rename a dimension",
        "tags": [
          "dimensions"
        ]
      }
    },
    "/v1/dimensions/{dimension_id}/values": {
      "get": {
        "description": "A dimension's values, by code.",
        "operationId": "dimension_values.list",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionValuePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a dimension's values",
        "tags": [
          "dimension_values"
        ]
      },
      "post": {
        "description": "Add a value to a dimension.\n\nRefused with `dimension_conflict` when the dimension already has one with\nthe same code, and `dimension_invalid` when the parent is not of it.",
        "operationId": "dimension_values.create",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDimensionValue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionValueOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a value to a dimension",
        "tags": [
          "dimension_values"
        ]
      }
    },
    "/v1/dimensions/{dimension_id}/values/{value_id}": {
      "delete": {
        "description": "Remove a value. Values under it move to the top.\n\nRefused with `dimension_in_use` once a posted line carries it.",
        "operationId": "dimension_values.delete",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "in": "path",
            "name": "value_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dimv_`.",
              "examples": [
                "dimv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Value Id",
              "type": "string",
              "x-id-prefix": "dimv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a dimension value no posted line carries",
        "tags": [
          "dimension_values"
        ]
      },
      "get": {
        "description": "One value of a dimension.",
        "operationId": "dimension_values.get",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "in": "path",
            "name": "value_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dimv_`.",
              "examples": [
                "dimv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Value Id",
              "type": "string",
              "x-id-prefix": "dimv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionValueOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a dimension value",
        "tags": [
          "dimension_values"
        ]
      },
      "patch": {
        "description": "Rename a value or move it under another. Its code never changes.\n\nRefused with `dimension_invalid` when the new parent is not of the same\ndimension, or is the value itself or one under it.",
        "operationId": "dimension_values.update",
        "parameters": [
          {
            "in": "path",
            "name": "dimension_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dim_`.",
              "examples": [
                "dim_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Dimension Id",
              "type": "string",
              "x-id-prefix": "dim"
            }
          },
          {
            "in": "path",
            "name": "value_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dimv_`.",
              "examples": [
                "dimv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Value Id",
              "type": "string",
              "x-id-prefix": "dimv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DimensionValueChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionValueOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rename a dimension value or move it under another",
        "tags": [
          "dimension_values"
        ]
      }
    },
    "/v1/documents": {
      "get": {
        "description": "The receipts and invoices behind these books, newest first, each with\nthe transactions it supports.",
        "operationId": "documents.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "True for documents that support a transaction, false for those still waiting for one. Absent is both.",
            "in": "query",
            "name": "matched",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "True for documents that support a transaction, false for those still waiting for one. Absent is both.",
              "title": "Matched"
            }
          },
          {
            "description": "Only this kind: one of receipt, invoice.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this kind: one of receipt, invoice.",
              "title": "Kind"
            }
          },
          {
            "description": "True for documents a bill was entered from, false for those no bill names yet: with `kind=invoice`, the vendors' bills still to enter. Absent is both.",
            "in": "query",
            "name": "billed",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "True for documents a bill was entered from, false for those no bill names yet: with `kind=invoice`, the vendors' bills still to enter. Absent is both.",
              "title": "Billed"
            }
          },
          {
            "description": "Only documents whose text matches: the description of a transaction they support, or the merchant read off them. Case does not matter.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only documents whose text matches: the description of a transaction they support, or the merchant read off them. Case does not matter.",
              "title": "Q"
            }
          },
          {
            "description": "Only documents that support a transaction with this counterparty.",
            "in": "query",
            "name": "counterparty_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only documents that support a transaction with this counterparty.",
              "title": "Counterparty Id"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List receipts and invoices with what they support",
        "tags": [
          "documents"
        ]
      },
      "post": {
        "description": "Keep a receipt or invoice. A PDF or a photo; the same file twice is one\ndocument. A receipt is read for its merchant, date, total, currency and\ntax in the background, and attached to the one transaction those match \u2014\nor to `event_id` straight away, when given. An invoice waits under the\nbills to enter instead.",
        "operationId": "documents.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/create"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRecordOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Upload a receipt or invoice",
        "tags": [
          "documents"
        ]
      }
    },
    "/v1/documents/{document_id}": {
      "delete": {
        "description": "Delete a receipt a person uploaded, with what was read off it and its\nfile \u2014 the wrong file, or one sent twice. Only one that supports no\ntransaction: detach it first. A document a connection filed comes back\nwith its next sync, so it is detached instead, never deleted. The file\nis removed in the background, shortly after.",
        "operationId": "documents.delete",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `doc_`.",
              "examples": [
                "doc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Document Id",
              "type": "string",
              "x-id-prefix": "doc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete an uploaded document",
        "tags": [
          "documents"
        ]
      },
      "get": {
        "description": "One receipt or invoice, and the transactions it supports. A document\nmerged into an earlier copy of the same file answers as that copy.",
        "operationId": "documents.get",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `doc_`.",
              "examples": [
                "doc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Document Id",
              "type": "string",
              "x-id-prefix": "doc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRecordOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a receipt or invoice",
        "tags": [
          "documents"
        ]
      }
    },
    "/v1/documents/{document_id}/bill_reading": {
      "post": {
        "description": "Read a document as a vendor's bill, for the bill form: the vendor, their\nnumber for it, its date and due date, its total, currency and tax, and\nits line items, each with how sure the reader was. The vendor's name is\nmatched to a counterparty of these books when exactly one has it. Read\nonce per reader version: asking again returns the same reading. Takes a\nfew seconds the first time. `reader_unavailable` when no model can be\nreached; nothing is stored then, so ask again later.",
        "operationId": "documents.read_bill",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `doc_`.",
              "examples": [
                "doc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Document Id",
              "type": "string",
              "x-id-prefix": "doc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillReadingOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read a document as a vendor's bill, for the bill form",
        "tags": [
          "documents"
        ]
      }
    },
    "/v1/documents/{document_id}/link": {
      "get": {
        "description": "A short-lived link to the document's file: our own copy when we hold\none, else the provider's link. Open it promptly; it expires.",
        "operationId": "documents.download_link",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `doc_`.",
              "examples": [
                "doc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Document Id",
              "type": "string",
              "x-id-prefix": "doc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentLink"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a short-lived link to a document's file",
        "tags": [
          "documents"
        ]
      }
    },
    "/v1/documents/{document_id}/links": {
      "post": {
        "description": "Attach a document to a transaction as its evidence. Attaching it again\nchanges nothing.",
        "operationId": "documents.attach",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `doc_`.",
              "examples": [
                "doc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Document Id",
              "type": "string",
              "x-id-prefix": "doc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRecordOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Attach a document to a transaction",
        "tags": [
          "documents"
        ]
      }
    },
    "/v1/documents/{document_id}/links/{event_id}": {
      "delete": {
        "description": "Detach a document from a transaction. The document stays, for anything\nelse it supports.",
        "operationId": "documents.detach",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `doc_`.",
              "examples": [
                "doc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Document Id",
              "type": "string",
              "x-id-prefix": "doc"
            }
          },
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Detach a document from a transaction",
        "tags": [
          "documents"
        ]
      }
    },
    "/v1/drafts": {
      "get": {
        "description": "Entries being written, oldest first. None of them is in the books.",
        "operationId": "drafts.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DraftPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List draft entries",
        "tags": [
          "drafts"
        ]
      },
      "post": {
        "description": "Start a draft entry. It may be unbalanced; it is checked when it posts.",
        "operationId": "drafts.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DraftOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a draft entry",
        "tags": [
          "drafts"
        ]
      }
    },
    "/v1/drafts/{draft_id}": {
      "delete": {
        "description": "Throw a draft away. It was never in the books, so nothing is reversed.",
        "operationId": "drafts.discard",
        "parameters": [
          {
            "in": "path",
            "name": "draft_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `draft_`.",
              "examples": [
                "draft_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Draft Id",
              "type": "string",
              "x-id-prefix": "draft"
            }
          },
          {
            "description": "The version you read; a stale one is refused.",
            "in": "query",
            "name": "row_version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The version you read; a stale one is refused.",
              "title": "Row Version"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Discard a draft entry",
        "tags": [
          "drafts"
        ]
      },
      "get": {
        "description": "One draft, with its lines and whether it would post as it stands.",
        "operationId": "drafts.get",
        "parameters": [
          {
            "in": "path",
            "name": "draft_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `draft_`.",
              "examples": [
                "draft_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Draft Id",
              "type": "string",
              "x-id-prefix": "draft"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DraftOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a draft entry",
        "tags": [
          "drafts"
        ]
      },
      "patch": {
        "description": "Change a draft. `lines`, when sent, replaces all of them. Refused with\n`draft_changed` when someone else changed it since `row_version`.",
        "operationId": "drafts.update",
        "parameters": [
          {
            "in": "path",
            "name": "draft_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `draft_`.",
              "examples": [
                "draft_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Draft Id",
              "type": "string",
              "x-id-prefix": "draft"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DraftOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a draft entry",
        "tags": [
          "drafts"
        ]
      }
    },
    "/v1/drafts/{draft_id}/post": {
      "post": {
        "description": "Post a draft into the books, with every rule an entry is held to, and\nremove the draft. Posting it again returns the same entry.",
        "operationId": "drafts.post",
        "parameters": [
          {
            "in": "path",
            "name": "draft_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `draft_`.",
              "examples": [
                "draft_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Draft Id",
              "type": "string",
              "x-id-prefix": "draft"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftVersion"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Post a draft entry into the books",
        "tags": [
          "drafts"
        ]
      }
    },
    "/v1/equity_awards": {
      "get": {
        "description": "Equity awards, the newest first: who holds each, what it is worth,\nhow much has vested and what the closes have expensed.",
        "operationId": "equity_awards.list",
        "parameters": [
          {
            "description": "Only awards in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "active",
                    "forfeited"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only awards in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Only this person's awards.",
            "in": "query",
            "name": "holder_party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this person's awards.",
              "title": "Holder Party Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquityAwardPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List equity awards",
        "tags": [
          "equity_awards"
        ]
      },
      "post": {
        "description": "Record an option, RSA or RSU grant.\n\nNothing posts now. Every close from the grant date expenses it straight\nline over its vesting, split by its department; service before the grant\nis caught up at the first close after it. Refused with\n`equity_award_terms` for a holder, department or account not of these\nbooks, or a cliff longer than its vesting.",
        "operationId": "equity_awards.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EquityAwardCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquityAwardDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Record an equity award",
        "tags": [
          "equity_awards"
        ]
      }
    },
    "/v1/equity_awards/{award_id}": {
      "delete": {
        "description": "Delete an award recorded in error, before any close has expensed it.\nRefused with `equity_award_in_use` after: forfeit it instead.",
        "operationId": "equity_awards.delete",
        "parameters": [
          {
            "in": "path",
            "name": "award_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `award_`.",
              "examples": [
                "award_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Award Id",
              "type": "string",
              "x-id-prefix": "award"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete an equity award no close has expensed",
        "tags": [
          "equity_awards"
        ]
      },
      "get": {
        "description": "An equity award month by month: shares vested and expense to date,\nand every close that expensed it.",
        "operationId": "equity_awards.get",
        "parameters": [
          {
            "in": "path",
            "name": "award_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `award_`.",
              "examples": [
                "award_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Award Id",
              "type": "string",
              "x-id-prefix": "award"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquityAwardDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an equity award month by month",
        "tags": [
          "equity_awards"
        ]
      },
      "patch": {
        "description": "Change an award's memo, or its terms until a close expenses it.\nRefused with `equity_award_in_use` for a term once its expense is in the\nbooks: forfeit it and grant it again.",
        "operationId": "equity_awards.update",
        "parameters": [
          {
            "in": "path",
            "name": "award_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `award_`.",
              "examples": [
                "award_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Award Id",
              "type": "string",
              "x-id-prefix": "award"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EquityAwardChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquityAwardDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change an equity award",
        "tags": [
          "equity_awards"
        ]
      }
    },
    "/v1/equity_awards/{award_id}/forfeit": {
      "post": {
        "description": "The holder left: forfeit what had not vested by their last day.\n\nThe expense comes down to the fair value of the shares that vested, and\nthe next close takes the rest back. Final. Refused with\n`equity_award_not_forfeitable` when it was already forfeited or the day\nis before the grant.",
        "operationId": "equity_awards.forfeit",
        "parameters": [
          {
            "in": "path",
            "name": "award_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `award_`.",
              "examples": [
                "award_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Award Id",
              "type": "string",
              "x-id-prefix": "award"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForfeitureIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquityAwardDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Forfeit what has not vested",
        "tags": [
          "equity_awards"
        ]
      }
    },
    "/v1/exceptions": {
      "get": {
        "description": "Everything the automation could not finish, across every month,\nnewest first: what it is, how much it matters and the record it is about.\nA month's close lists the same items for that month; this is the whole\nqueue, for working it without opening each month.",
        "operationId": "exceptions.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "`open` (the default): still waiting. `resolved`: someone did what it asked. `dismissed`: someone decided it needed nothing.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "open",
              "description": "`open` (the default): still waiting. `resolved`: someone did what it asked. `dismissed`: someone decided it needed nothing.",
              "enum": [
                "open",
                "resolved",
                "dismissed"
              ],
              "title": "Status",
              "type": "string"
            }
          },
          {
            "description": "Only this kind, such as `missing_receipt`.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this kind, such as `missing_receipt`.",
              "title": "Kind"
            }
          },
          {
            "description": "Only items assigned to this member's user id; `me` for the caller's own, `none` for those nobody has taken.",
            "in": "query",
            "name": "assigned_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only items assigned to this member's user id; `me` for the caller's own, `none` for those nobody has taken.",
              "title": "Assigned To"
            }
          },
          {
            "description": "Only items waiting on this: `owner` for what needs the business, `reviewer` for what is with the accountant, `agent` or `third_party`.",
            "in": "query",
            "name": "waiting_on",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "agent",
                    "reviewer",
                    "owner",
                    "third_party"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only items waiting on this: `owner` for what needs the business, `reviewer` for what is with the accountant, `agent` or `third_party`.",
              "title": "Waiting On"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what the automation could not finish",
        "tags": [
          "exceptions"
        ]
      }
    },
    "/v1/exceptions/counts": {
      "get": {
        "description": "How many open items wait on the owner, the reviewer and someone\noutside the books, and the money at stake in each, per currency; and\nwhether the books have a reviewer to send items to. The agent's own\nitems are not counted: nobody is asked about them yet.",
        "operationId": "exceptions.counts",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionCountsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Count the open items by whom they wait on",
        "tags": [
          "exceptions"
        ]
      }
    },
    "/v1/exceptions/{exception_id}/approve": {
      "post": {
        "description": "Approve what the books recommend for an item asking for a category \u2014\nor file it under `account_id` \u2014 and resolve it. The transaction is filed\nexactly as filing it by hand files it (`POST /transactions/{id}/categorize`),\nso the same refusals apply: `account_not_usable`, and `period_closed` for\na transaction in a closed month.\n\nWith `always`, a rule files every later transaction with the same\ncounterparty here, with no model asked.\n\nA `missing_accrual` item from the books' daily check is approved by\naccruing the vendor's month: its usual amount (or `amount`) to the\naccount its charges are filed to (or `account_id`), as\n`POST /schedules/accruals` would, settled by the vendor's next charge\neven if it lands later in the month. The accrual's id is kept on the\nitem's `detail` as `schedule_id`.\n\nA `payroll_accrual` item, the days of a month no payroll run paid by its\nend, is approved by accruing each account's share as the item shows it,\nreversed on the next month's first day when the run paying those days\nlands; it takes no `account_id`, `amount`, `always` or `dimensions`. The\naccruals' ids are kept on the item's `detail` as `schedule_ids`.\n\nA `payroll_department` item, a team the payroll provider names and the\nbooks' department dimension lacks, is approved by adding it under\n`parent_id` (else the department the item proposes); the next payroll\nrun files its people there. The new value's id is kept on the item's\n`detail` as `value_id`. `parent_id` is taken by no other kind.\n\nA `payment_match` item, a bank or card line that pays an open invoice or\nbill, is approved by settling the line as the item's `detail.parts`\npropose, as `POST /transactions/{id}/settle` would; it takes no\n`account_id`, `amount`, `always` or `dimensions`.\n\nNaturally idempotent: approving an item already approved under the same\naccount returns it unchanged. Refused with `conflict` for one closed some\nother way, and `unprocessable` for one that asks for something else.",
        "operationId": "exceptions.approve",
        "parameters": [
          {
            "in": "path",
            "name": "exception_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `exc_`.",
              "examples": [
                "exc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Exception Id",
              "type": "string",
              "x-id-prefix": "exc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveException"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Approve what the books recommend for an item",
        "tags": [
          "exceptions"
        ]
      }
    },
    "/v1/exceptions/{exception_id}/assign": {
      "post": {
        "description": "Give an item on the exception queue to a member to work, or hand it\nback with null. Refused with `unprocessable` for someone who does not\nopen these books.",
        "operationId": "exceptions.assign",
        "parameters": [
          {
            "in": "path",
            "name": "exception_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `exc_`.",
              "examples": [
                "exc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Exception Id",
              "type": "string",
              "x-id-prefix": "exc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignException"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Assign a close exception to a member",
        "tags": [
          "exceptions"
        ]
      }
    },
    "/v1/exceptions/{exception_id}/escalate": {
      "post": {
        "description": "Hand an open item to the business owner, with a note: what only they\ncan answer. It leaves the reviewer's queue for the owner's \"Needs you\".\n\nNaturally idempotent: an item already waiting on the owner is returned as\nit is. Refused with `conflict` for an item no longer open.",
        "operationId": "exceptions.escalate",
        "parameters": [
          {
            "in": "path",
            "name": "exception_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `exc_`.",
              "examples": [
                "exc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Exception Id",
              "type": "string",
              "x-id-prefix": "exc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EscalateException"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Hand an open item to the business owner",
        "tags": [
          "exceptions"
        ]
      }
    },
    "/v1/exceptions/{exception_id}/resolve": {
      "post": {
        "description": "Resolve (or dismiss) one item on a month's exception queue, with the\nreason on the record.",
        "operationId": "exceptions.resolve",
        "parameters": [
          {
            "in": "path",
            "name": "exception_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `exc_`.",
              "examples": [
                "exc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Exception Id",
              "type": "string",
              "x-id-prefix": "exc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveException"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Resolve a close exception",
        "tags": [
          "exceptions"
        ]
      }
    },
    "/v1/exceptions/{exception_id}/send_to_reviewer": {
      "post": {
        "description": "Hand an open item to the books' accountant or firm, with a note: the\nowner's way of saying \"you take this one\". The inverse of escalating: it\nleaves the owner's \"Needs you\" for the reviewer's queue, and the note is\nkept on the item as its latest hand-over (`escalation_note`), for the\nreviewer to read there.\n\nNaturally idempotent: an item already waiting on the reviewer is returned\nas it is. Refused with `no_reviewer` when nobody reviews these books, and\nwith `conflict` for an item no longer open.",
        "operationId": "exceptions.send_to_reviewer",
        "parameters": [
          {
            "in": "path",
            "name": "exception_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `exc_`.",
              "examples": [
                "exc_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Exception Id",
              "type": "string",
              "x-id-prefix": "exc"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendExceptionToReviewer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Hand an open item to the books' accountant or firm",
        "tags": [
          "exceptions"
        ]
      }
    },
    "/v1/external_accounts": {
      "get": {
        "description": "The bank accounts and cards these books' connections read, in the\norder they were found, each with the GL account it posts to today, the\nGL accounts it posted to by date, the balance the provider last\nreported, and the company whose books it feeds.",
        "operationId": "external_accounts.list",
        "parameters": [
          {
            "description": "Only the accounts this connection reads.",
            "in": "query",
            "name": "connection_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `conn_`.",
                  "examples": [
                    "conn_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "conn"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the accounts this connection reads.",
              "title": "Connection Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalAccountList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the bank accounts and cards the books read",
        "tags": [
          "external_accounts"
        ]
      }
    },
    "/v1/external_accounts/order": {
      "get": {
        "description": "The order these books' Bank accounts page lists its banks, and each bank's\naccounts, in (decision 0179).",
        "operationId": "external_accounts.get_order",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayOrderOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the order the Bank accounts page lists banks in",
        "tags": [
          "external_accounts"
        ]
      },
      "put": {
        "description": "Put the banks, one bank's accounts, or both, in a new order on the\nBank accounts page. Each list is the whole order of what it covers; a bank or\naccount left out keeps its place after the listed ones. An account list\nnames one bank's accounts only, since a position means something only\nbeside its siblings. Sending the same order again changes nothing, so a\nretried request is safe.",
        "operationId": "external_accounts.set_order",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayOrderIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayOrderOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Put the Bank accounts page's banks or accounts in order",
        "tags": [
          "external_accounts"
        ]
      }
    },
    "/v1/external_accounts/{external_account_id}": {
      "get": {
        "description": "One bank account or card these books' connections read, with the GL\naccounts it posts to by date.",
        "operationId": "external_accounts.get",
        "parameters": [
          {
            "in": "path",
            "name": "external_account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `acct_`.",
              "examples": [
                "acct_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "External Account Id",
              "type": "string",
              "x-id-prefix": "acct"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceAccountOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a bank account or card",
        "tags": [
          "external_accounts"
        ]
      },
      "patch": {
        "description": "Post a bank account or card to another GL account, from a date or for\ngood (decision 0088).\n\nWith `effective_from`, a row dated that day or later lands in the new GL\naccount and an earlier one, arriving late, keeps to the account mapped\nthen. Without it, everything from the next sync on lands in the new one.\nWhat is already in the books stays where it was posted: to move it,\nreverse or refile those entries. A remap never reaches into a locked\nmonth: a date in one, or replacing a mapping that starts in one, is\nrefused with `period_closed` (decision 0096). A bank account posts to an\nasset account and a card to a liability account; the other side is\nrefused, because it would invert the account. Naming the mapping it\nalready has changes nothing, so a retried request is safe.",
        "operationId": "external_accounts.remap",
        "parameters": [
          {
            "in": "path",
            "name": "external_account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `acct_`.",
              "examples": [
                "acct_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "External Account Id",
              "type": "string",
              "x-id-prefix": "acct"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceAccountChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceAccountOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Post a bank account or card to another GL account from a date",
        "tags": [
          "external_accounts"
        ]
      }
    },
    "/v1/external_accounts/{external_account_id}/visibility": {
      "put": {
        "description": "Hide a bank account or card on the Bank accounts page, or show it again\n(decision 0179). Display only: a hidden account still syncs, posts and\ncounts in every balance and report. Naming the state it is already in\nchanges nothing, so a retried request is safe.",
        "operationId": "external_accounts.set_visibility",
        "parameters": [
          {
            "in": "path",
            "name": "external_account_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `acct_`.",
              "examples": [
                "acct_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "External Account Id",
              "type": "string",
              "x-id-prefix": "acct"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalAccountVisibility"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceAccountOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Hide a bank account or card on the Bank accounts page, or show it",
        "tags": [
          "external_accounts"
        ]
      }
    },
    "/v1/financing_instruments": {
      "get": {
        "description": "The financing instruments of these books, the newest first, each with\nwhat has happened to it.",
        "operationId": "financing_instruments.list",
        "parameters": [
          {
            "description": "Only `draft`, `outstanding`, `converted` or `void` instruments.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `draft`, `outstanding`, `converted` or `void` instruments.",
              "title": "Status"
            }
          },
          {
            "description": "Only this investor's instruments.",
            "in": "query",
            "name": "investor_party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this investor's instruments.",
              "title": "Investor Party Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List financing instruments",
        "tags": [
          "financing_instruments"
        ]
      },
      "post": {
        "description": "Write a SAFE's, a convertible note's or venture debt's terms as a\ndraft. Nothing is on the books until it is issued.",
        "operationId": "financing_instruments.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstrumentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Write a draft SAFE, note or venture debt",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}": {
      "delete": {
        "description": "Delete a draft. One on the books is voided instead.",
        "operationId": "financing_instruments.delete",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a draft financing instrument",
        "tags": [
          "financing_instruments"
        ]
      },
      "get": {
        "description": "One financing instrument and what has happened to it.",
        "operationId": "financing_instruments.get",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a financing instrument",
        "tags": [
          "financing_instruments"
        ]
      },
      "patch": {
        "description": "Change a draft's terms. Once it is on the books only its memo\nchanges; anything else is refused with `conflict`.",
        "operationId": "financing_instruments.update",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstrumentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a financing instrument",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}/accrue": {
      "post": {
        "description": "Accrue an outstanding note's or venture debt's interest through a day:\ninterest expense against accrued interest, from the day after it last\naccrued. Every month-end close does this on its own; accruing again\nthrough the same day writes nothing. A SAFE is refused with `conflict`.",
        "operationId": "financing_instruments.accrue",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstrumentAccrue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Accrue a note's or loan's interest",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}/conversion_preview": {
      "get": {
        "description": "What converting an outstanding SAFE or convertible note at a priced\nround would do: the round, cap and discount prices, the lowest of them,\nthe shares and how the amount splits between par and paid-in capital.\nWrites nothing.",
        "operationId": "financing_instruments.preview_conversion",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "description": "The priced round's price per share.",
            "in": "query",
            "name": "price_per_share",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0.0,
                  "type": "number"
                },
                {
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                  "type": "string"
                }
              ],
              "description": "The priced round's price per share.",
              "title": "Price Per Share"
            }
          },
          {
            "description": "The par value of one share it converts into.",
            "in": "query",
            "name": "par_value",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0.0,
                  "type": "number"
                },
                {
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                  "type": "string"
                }
              ],
              "description": "The par value of one share it converts into.",
              "title": "Par Value"
            }
          },
          {
            "description": "The company capitalization, in shares, the valuation cap divides by. Needed with a cap.",
            "in": "query",
            "name": "capitalization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0.0,
                  "type": "number"
                },
                {
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The company capitalization, in shares, the valuation cap divides by. Needed with a cap.",
              "title": "Capitalization"
            }
          },
          {
            "description": "The shares the round's cap table issues, if it differs.",
            "in": "query",
            "name": "shares",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The shares the round's cap table issues, if it differs.",
              "title": "Shares"
            }
          },
          {
            "description": "For a note: the day it would convert, which its interest accrues through. Today when left out.",
            "in": "query",
            "name": "converted_on",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "For a note: the day it would convert, which its interest accrues through. Today when left out.",
              "title": "Converted On"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Preview a SAFE's or note's conversion",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}/convert": {
      "post": {
        "description": "Convert an outstanding SAFE or convertible note at a priced round: its\nwhole carrying amount, and a note's interest accrued through the day,\nmoves out, preferred stock at par for the shares and paid-in capital for\nthe rest. Venture debt is refused with `conflict`.",
        "operationId": "financing_instruments.convert",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstrumentConvert"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Convert a SAFE or note at a priced round",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}/issue": {
      "post": {
        "description": "Put a draft on the books at its principal: the account the money came\nin through against the account it is carried in.",
        "operationId": "financing_instruments.issue",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Issue a financing instrument onto the books",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}/payoff": {
      "get": {
        "description": "What paying off an outstanding note or venture debt would take on a\nday: the principal still owed and the interest accrued by then. Writes\nnothing.",
        "operationId": "financing_instruments.payoff",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "description": "The day it would be paid off. Today when left out.",
            "in": "query",
            "name": "on",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The day it would be paid off. Today when left out.",
              "title": "On"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoffOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get what pays off a note or loan",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}/repay": {
      "post": {
        "description": "Record a payment on an outstanding note or venture debt. Interest\naccrues through the day first; then the principal comes off the account\nit is carried in and the interest off accrued interest, against the\naccount the money left through. Once nothing is owed it is `repaid`.",
        "operationId": "financing_instruments.repay",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstrumentRepay"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Record a payment on a note or loan",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/financing_instruments/{instrument_id}/void": {
      "post": {
        "description": "Take an instrument recorded in error off the books by reversing its\nissue. One that has converted, accrued interest or been repaid is\nrefused with `conflict`.",
        "operationId": "financing_instruments.void",
        "parameters": [
          {
            "in": "path",
            "name": "instrument_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fin_`.",
              "examples": [
                "fin_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Instrument Id",
              "type": "string",
              "x-id-prefix": "fin"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstrumentVoid"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Void an instrument recorded in error",
        "tags": [
          "financing_instruments"
        ]
      }
    },
    "/v1/fixed_assets": {
      "get": {
        "description": "The fixed asset register, the newest first: what each asset cost, what\nthe closes have depreciated, and its book value.",
        "operationId": "fixed_assets.list",
        "parameters": [
          {
            "description": "Only assets in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "in_service",
                    "disposed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only assets in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List fixed assets",
        "tags": [
          "fixed_assets"
        ]
      },
      "post": {
        "description": "Put an asset in the register and start depreciating it.\n\nIts cost is already in the books, filed to the asset account when it was\nbought; registering posts nothing. Every close from the month it went into\nservice posts that month's depreciation, straight line, and a month\nalready closed is caught up at the next close, carrying the department\nnamed. Refused with `fixed_asset_terms` for salvage at or above cost, an\naccount of the wrong type, or a source transaction that is not filed to\nthe asset account or is already another asset's.",
        "operationId": "fixed_assets.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Register a fixed asset",
        "tags": [
          "fixed_assets"
        ]
      }
    },
    "/v1/fixed_assets/{asset_id}": {
      "delete": {
        "description": "Take an asset out of the register before any close has depreciated it.\nRefused with `fixed_asset_in_use` once its depreciation is in the books:\ndispose of it instead.",
        "operationId": "fixed_assets.delete",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `asset_`.",
              "examples": [
                "asset_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Asset Id",
              "type": "string",
              "x-id-prefix": "asset"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a fixed asset no close has depreciated",
        "tags": [
          "fixed_assets"
        ]
      },
      "get": {
        "description": "A fixed asset with its depreciation month by month: what each month\ntakes, and the entry that posted it.",
        "operationId": "fixed_assets.get",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `asset_`.",
              "examples": [
                "asset_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Asset Id",
              "type": "string",
              "x-id-prefix": "asset"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a fixed asset month by month",
        "tags": [
          "fixed_assets"
        ]
      },
      "patch": {
        "description": "Rename a fixed asset or change its memo. Its cost, life and accounts\nstay as registered: delete it before the first close depreciates it, or\ndispose of it and register it again.",
        "operationId": "fixed_assets.update",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `asset_`.",
              "examples": [
                "asset_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Asset Id",
              "type": "string",
              "x-id-prefix": "asset"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rename a fixed asset",
        "tags": [
          "fixed_assets"
        ]
      }
    },
    "/v1/fixed_assets/{asset_id}/dispose": {
      "post": {
        "description": "Sell, scrap or give away a fixed asset.\n\nDepreciation is caught up through the month before (none is taken in the\nmonth of disposal), then one entry on the disposal day takes it off the\nbooks: its accumulated depreciation and any proceeds against its cost,\nthe difference a gain or a loss. Reverse that entry from the ledger to put\nit back in service. Refused with `fixed_asset_not_disposable` when it was\nalready disposed of, or its depreciation is posted past the day.",
        "operationId": "fixed_assets.dispose",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `asset_`.",
              "examples": [
                "asset_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Asset Id",
              "type": "string",
              "x-id-prefix": "asset"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisposalIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Dispose of a fixed asset",
        "tags": [
          "fixed_assets"
        ]
      }
    },
    "/v1/fx_rates": {
      "get": {
        "description": "The rates these books convert at, the newest set first.",
        "operationId": "fx_rates.list",
        "parameters": [
          {
            "description": "Only this currency's rates.",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 3,
                  "minLength": 3,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this currency's rates.",
              "title": "Currency"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RatePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List FX rates",
        "tags": [
          "fx_rates"
        ]
      },
      "post": {
        "description": "Set a currency's rate on a day. Refused with `conflict` when that day\nalready has one: change it instead.",
        "operationId": "fx_rates.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set an FX rate",
        "tags": [
          "fx_rates"
        ]
      }
    },
    "/v1/fx_rates/{rate_id}": {
      "delete": {
        "description": "Delete a rate. Lines booked at it keep it.",
        "operationId": "fx_rates.delete",
        "parameters": [
          {
            "in": "path",
            "name": "rate_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fx_`.",
              "examples": [
                "fx_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rate Id",
              "type": "string",
              "x-id-prefix": "fx"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete an FX rate",
        "tags": [
          "fx_rates"
        ]
      },
      "get": {
        "description": "One rate.",
        "operationId": "fx_rates.get",
        "parameters": [
          {
            "in": "path",
            "name": "rate_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fx_`.",
              "examples": [
                "fx_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rate Id",
              "type": "string",
              "x-id-prefix": "fx"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an FX rate",
        "tags": [
          "fx_rates"
        ]
      },
      "patch": {
        "description": "Correct a rate. Every line already posted keeps the rate it was\nbooked at; the next posting and revaluation use this one.",
        "operationId": "fx_rates.update",
        "parameters": [
          {
            "in": "path",
            "name": "rate_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `fx_`.",
              "examples": [
                "fx_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rate Id",
              "type": "string",
              "x-id-prefix": "fx"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Correct an FX rate",
        "tags": [
          "fx_rates"
        ]
      }
    },
    "/v1/home": {
      "get": {
        "description": "Cash, burn, runway, MRR and ARR, every one read from the books at the\nsame posting sequence \u2014 so the page never mixes before and after a post,\nand the same sequence always gives the same figures.\n\nBeside them, cash after known bills: cash less the bills coming due and\nthe payroll expected over the next 90 days. The bills and payroll are\nread as the books stand, not at the sequence (decision 0167).",
        "operationId": "home.get",
        "parameters": [
          {
            "description": "Read the books as posted through this sequence. Defaults to the latest.",
            "in": "query",
            "name": "through_sequence",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Read the books as posted through this sequence. Defaults to the latest.",
              "title": "Through Sequence"
            }
          },
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "As Of"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HomeOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get cash, burn, runway and MRR at one posting sequence, and cash after known bills",
        "tags": [
          "home"
        ]
      }
    },
    "/v1/home/attention": {
      "get": {
        "description": "What needs a person today: an unhealthy connection (failing, needing a\nsign-in within a week, or behind its freshness target) or an overdue\nclose first, because the books are wrong or late until someone acts, then\nthe open questions waiting on the caller, transactions to review, receipts\nto match and the open items waiting on the owner \u2014 not the ones with the\nbooks' accountant.\n\nA question waits on the member it was asked of. For an owner or admin\n(`questions.business`) it also counts the business's questions: those\nasked of an owner or admin, or of nobody who still opens the books, such\nas a member who has left \u2014 the questions that make the month's Questions\npart the owner's.",
        "operationId": "home.attention",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttentionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what needs a person today",
        "tags": [
          "home"
        ]
      }
    },
    "/v1/intercompany_transactions": {
      "get": {
        "description": "Intercompany transactions on either side of these books, the newest\nfirst.",
        "operationId": "intercompany_transactions.list",
        "parameters": [
          {
            "description": "Only those with these other books, on either side.",
            "in": "query",
            "name": "counterparty_entity_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `ent_`.",
                  "examples": [
                    "ent_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "ent"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those with these other books, on either side.",
              "title": "Counterparty Entity Id"
            }
          },
          {
            "description": "Only those in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "posted",
                    "reversed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntercompanyTransactionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List intercompany transactions",
        "tags": [
          "intercompany_transactions"
        ]
      },
      "post": {
        "description": "Record what other books of the organization owe these books, and post\nit in both: these books debit what is due from them, theirs credit what is\ndue to these.\n\nRefused with `intercompany_refused` for books of another organization or\nthat you cannot post in, accounts of the wrong kind, a missing amount in\ntheir currency, or an API key.",
        "operationId": "intercompany_transactions.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntercompanyTransactionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntercompanyTransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Record an intercompany amount in both sets of books",
        "tags": [
          "intercompany_transactions"
        ]
      }
    },
    "/v1/intercompany_transactions/{transaction_id}": {
      "get": {
        "description": "One intercompany transaction and both of its entries.",
        "operationId": "intercompany_transactions.get",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `ic_`.",
              "examples": [
                "ic_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Transaction Id",
              "type": "string",
              "x-id-prefix": "ic"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntercompanyTransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an intercompany transaction",
        "tags": [
          "intercompany_transactions"
        ]
      }
    },
    "/v1/intercompany_transactions/{transaction_id}/reverse": {
      "post": {
        "description": "Reverse both entries together. Refused with `intercompany_refused`\nwhen it was already reversed or you cannot post in both sets of books.",
        "operationId": "intercompany_transactions.reverse",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `ic_`.",
              "examples": [
                "ic_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Transaction Id",
              "type": "string",
              "x-id-prefix": "ic"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntercompanyReversal"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntercompanyTransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Reverse an intercompany transaction in both sets of books",
        "tags": [
          "intercompany_transactions"
        ]
      }
    },
    "/v1/investor_shares": {
      "get": {
        "description": "The links these books are shared with investors by, the newest first,\neach with when it was last opened.",
        "operationId": "investor_shares.list",
        "parameters": [
          {
            "description": "Only `live`, `expired` or `revoked` links.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "live",
                    "expired",
                    "revoked"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `live`, `expired` or `revoked` links.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestorSharePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the links the books are shared with investors by",
        "tags": [
          "investor_shares"
        ]
      },
      "post": {
        "description": "Share these books with an investor through a link. The link opens a\nread-only page of the closed months \u2014 the board packs, the statements, or\nboth \u2014 with no account needed, until it expires or is revoked. The answer\ncarries the link's token and address once; nothing is emailed.",
        "operationId": "investor_shares.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestorShareCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestorShareCreatedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Share the books with an investor through a link",
        "tags": [
          "investor_shares"
        ]
      }
    },
    "/v1/investor_shares/{share_id}": {
      "delete": {
        "description": "Revoke a link: from now on it opens nothing, and files already\ndownloaded keep the watermark naming who they were shared with. A link is\nrevoked, never erased, so the record of who was shown what stays.\nRevoking a revoked link changes nothing.",
        "operationId": "investor_shares.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "share_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `investor_share_`.",
              "examples": [
                "investor_share_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Share Id",
              "type": "string",
              "x-id-prefix": "investor_share"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestorShareOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Revoke an investor link",
        "tags": [
          "investor_shares"
        ]
      },
      "get": {
        "description": "One investor link: who it is for, what it shows, and when it was last\nopened. Its token is not in it: that is shown once, when it is made.",
        "operationId": "investor_shares.get",
        "parameters": [
          {
            "in": "path",
            "name": "share_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `investor_share_`.",
              "examples": [
                "investor_share_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Share Id",
              "type": "string",
              "x-id-prefix": "investor_share"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestorShareOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an investor link and when it was last opened",
        "tags": [
          "investor_shares"
        ]
      }
    },
    "/v1/invoices": {
      "get": {
        "description": "The invoices of these books, the newest first, each with what is\nstill owed on it.",
        "operationId": "invoices.list",
        "parameters": [
          {
            "description": "Only `draft`, `issued` or `void` invoices.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `draft`, `issued` or `void` invoices.",
              "title": "Status"
            }
          },
          {
            "description": "Only this customer's invoices.",
            "in": "query",
            "name": "party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this customer's invoices.",
              "title": "Party Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List invoices",
        "tags": [
          "invoices"
        ]
      },
      "post": {
        "description": "Write a draft invoice for a customer. Nothing is on the books until it\nis issued. Its number is the next of these books' own when left out, and\nit falls due on the customer's payment terms (30 days without) when no\ndue day is given.",
        "operationId": "invoices.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Write a draft invoice",
        "tags": [
          "invoices"
        ]
      }
    },
    "/v1/invoices/{invoice_id}": {
      "delete": {
        "description": "Delete a draft. An issued invoice is refused with `conflict`: it is\nvoided instead, and stays.",
        "operationId": "invoices.delete",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a draft invoice",
        "tags": [
          "invoices"
        ]
      },
      "get": {
        "description": "One invoice, its lines and what is still owed on it.",
        "operationId": "invoices.get",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an invoice",
        "tags": [
          "invoices"
        ]
      },
      "patch": {
        "description": "Change a draft: any field given, and every line at once when `lines`\nis. An issued invoice is refused with `conflict`: void it and issue\nanother.",
        "operationId": "invoices.update",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a draft invoice",
        "tags": [
          "invoices"
        ]
      }
    },
    "/v1/invoices/{invoice_id}/issue": {
      "post": {
        "description": "Put a draft on the books: one entry on its issue day, the total on\naccounts receivable naming the customer, against each line's account.\nWhat the customer owes then ages from the invoice's due day.",
        "operationId": "invoices.issue",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Issue an invoice onto the books",
        "tags": [
          "invoices"
        ]
      }
    },
    "/v1/invoices/{invoice_id}/payment_link": {
      "delete": {
        "description": "Take an invoice's payment link away. One LedgerIt made is turned off\nin Stripe, so it takes nothing more.",
        "operationId": "invoices.delete_payment_link",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Take an invoice's payment link away",
        "tags": [
          "invoices"
        ]
      },
      "post": {
        "description": "Make a Stripe-hosted payment link for what is still owed on an issued\ninvoice, in the books' own Stripe account, replacing one LedgerIt made\nbefore. The link takes one payment; at the next Stripe sync that payment\nis recorded and applied to the invoice. Refused with `unprocessable` when\nthe books have no Stripe connection or its key may not make payment\nlinks, and with `conflict` when nothing is owed.",
        "operationId": "invoices.create_payment_link",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Make a payment link for an invoice",
        "tags": [
          "invoices"
        ]
      }
    },
    "/v1/invoices/{invoice_id}/reminders": {
      "put": {
        "description": "Turn the customer's reminders on or off, on a draft or an issued\ninvoice. While on, the customer is emailed three days before the due day,\nthen one, seven and fourteen days after, each once, while anything is\nowed. Refused with `conflict` on a void invoice.",
        "operationId": "invoices.set_reminders",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceReminders"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Turn an invoice's reminders on or off",
        "tags": [
          "invoices"
        ]
      }
    },
    "/v1/invoices/{invoice_id}/void": {
      "post": {
        "description": "Take an issued invoice off the books by reversing its entry. Refused\nwith `conflict` while a payment is applied to it.",
        "operationId": "invoices.void",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `inv_`.",
              "examples": [
                "inv_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Invoice Id",
              "type": "string",
              "x-id-prefix": "inv"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceVoid"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Void an issued invoice",
        "tags": [
          "invoices"
        ]
      }
    },
    "/v1/journal_entries": {
      "get": {
        "description": "Newest first \u2014 the order a ledger is read in.",
        "operationId": "journal_entries.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Id"
            }
          },
          {
            "description": "Only entries with a line that names this counterparty, or one merged into it.",
            "in": "query",
            "name": "party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only entries with a line that names this counterparty, or one merged into it.",
              "title": "Party Id"
            }
          },
          {
            "description": "Only entries whose description or memo contains this, ignoring case.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only entries whose description or memo contains this, ignoring case.",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "description": "`current` (the default) shows the treatment that stands; `history` adds every reversed entry and its reversal.",
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "default": "current",
              "description": "`current` (the default) shows the treatment that stands; `history` adds every reversed entry and its reversal.",
              "enum": [
                "current",
                "history"
              ],
              "title": "View",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List journal entries",
        "tags": [
          "journal_entries"
        ]
      },
      "post": {
        "description": "Post a manual journal entry.\n\nThe request's `Idempotency-Key`, when sent, is kept on the entry: a retry\nwith it and the same lines returns the same entry however long after, and\nreusing it for different lines is a 409 `idempotency_key_reused`.",
        "operationId": "journal_entries.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Post a journal entry",
        "tags": [
          "journal_entries"
        ]
      }
    },
    "/v1/journal_entries/batch": {
      "post": {
        "description": "Post up to 1,000 manual journal entries at once, all or none \u2014 for\nbackfills and migrations. They take one contiguous run of posting\nsequences. A refusal names the entry it is about (\"Entry 12 of the\nbatch: \u2026\") and posts nothing.\n\nRe-running a batch is safe: an entry whose idempotency key is already in\nthe books is returned as it was posted, and one whose key was used for\ndifferent content is a 409 `idempotency_key_reused`.",
        "operationId": "journal_entries.create_batch",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryBatch"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Post up to 1,000 journal entries at once",
        "tags": [
          "journal_entries"
        ]
      }
    },
    "/v1/journal_entries/{entry_id}": {
      "get": {
        "description": "One journal entry with its lines, debits first.",
        "operationId": "journal_entries.get",
        "parameters": [
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `je_`.",
              "examples": [
                "je_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Entry Id",
              "type": "string",
              "x-id-prefix": "je"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a journal entry",
        "tags": [
          "journal_entries"
        ]
      }
    },
    "/v1/journal_entries/{entry_id}/replace": {
      "post": {
        "description": "Edit a manual entry: reverse it and post the corrected one, together.\nBoth land in the original's period, which has to be open. The original\nand its reversal stay in the history view; the current view shows the\nreplacement alone.",
        "operationId": "journal_entries.replace",
        "parameters": [
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `je_`.",
              "examples": [
                "je_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Entry Id",
              "type": "string",
              "x-id-prefix": "je"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplacementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplacementOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Edit a journal entry by replacing it",
        "tags": [
          "journal_entries"
        ]
      }
    },
    "/v1/journal_entries/{entry_id}/reverse": {
      "post": {
        "description": "Undo an entry by posting its mirror image. Both stay in the books.\n\nRefused with `transaction_spread` for the entry of a transaction spread\nover months: delete its schedule first, and with `transaction_capitalized`\nfor the entry of a transaction a fixed asset was capitalized from: delete\nor dispose of the asset first. Refused with\n`intercompany_refused` for one side of an intercompany transaction:\nreverse the transaction, so both sets of books change. Reversing a fixed\nasset's disposal puts it back in service; its depreciation is refused with\n`fixed_asset_not_disposable` while it is disposed of.",
        "operationId": "journal_entries.reverse",
        "parameters": [
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `je_`.",
              "examples": [
                "je_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Entry Id",
              "type": "string",
              "x-id-prefix": "je"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReversalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Reverse a journal entry",
        "tags": [
          "journal_entries"
        ]
      }
    },
    "/v1/mailbox_messages": {
      "get": {
        "description": "The messages mailbox searches opened, newest first, with what became\nof each: kept as a receipt, or set aside.",
        "operationId": "mailbox_messages.list",
        "parameters": [
          {
            "description": "Only this mailbox's.",
            "in": "query",
            "name": "connection_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `conn_`.",
                  "examples": [
                    "conn_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "conn"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this mailbox's.",
              "title": "Connection Id"
            }
          },
          {
            "description": "Only messages kept, or only those set aside.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MessageStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only messages kept, or only those set aside.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxMessagePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the messages mailbox searches opened",
        "tags": [
          "mailbox_messages"
        ]
      }
    },
    "/v1/mailbox_messages/{message_id}": {
      "get": {
        "description": "One message a mailbox search opened, and what became of it.",
        "operationId": "mailbox_messages.get",
        "parameters": [
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mail_msg_`.",
              "examples": [
                "mail_msg_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Message Id",
              "type": "string",
              "x-id-prefix": "mail_msg"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxMessageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a message a mailbox search opened",
        "tags": [
          "mailbox_messages"
        ]
      }
    },
    "/v1/mailboxes/{connection_id}/search": {
      "get": {
        "description": "Whether the mailbox is being searched for missing receipts right now,\nand when it last was. What each search found, and how it ended, are\nthe connection's runs.",
        "operationId": "mailboxes.get_search",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `conn_`.",
              "examples": [
                "conn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Connection Id",
              "type": "string",
              "x-id-prefix": "conn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxSearchStateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get whether a mailbox is being searched now",
        "tags": [
          "mailboxes"
        ]
      },
      "post": {
        "description": "Search a mailbox now for the receipts of charges that have none,\nrather than at the next six-hourly search. Charges searched for within\nthe last day are left for later.",
        "operationId": "mailboxes.search",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `conn_`.",
              "examples": [
                "conn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Connection Id",
              "type": "string",
              "x-id-prefix": "conn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailboxSearchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Search a mailbox for missing receipts now",
        "tags": [
          "mailboxes"
        ]
      }
    },
    "/v1/migrations": {
      "get": {
        "description": "Migration runs into these books, the newest first.",
        "operationId": "migrations.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List migration runs",
        "tags": [
          "migrations"
        ]
      },
      "post": {
        "description": "Start a migration with the old books as they stood on the cutover day:\ntheir accounts and trial balance, and their open invoices and bills when\nthere are any. Each source account is matched to an account of these\nbooks by number, then by name, and only to one of the same type; each\ncustomer or vendor to the counterparty of the same name. The run is\n`mapped` once every account with a balance lands somewhere, and `draft`\nuntil then.",
        "operationId": "migrations.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a migration from other books",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/csv": {
      "post": {
        "description": "Start an opening-balances migration from books kept anywhere else,\nwritten into LedgerIt's own file shape: a trial balance as of the cutover\nday and, optionally, the open invoices, bills and credits on it, each on\nits customer or vendor. The shape is in the `switch-from-quickbooks`\nguide, with templates to copy. Refused with `unprocessable` for a file not in\nthat shape, naming the row that is not.",
        "operationId": "migrations.create_from_csv",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/create_from_csv"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a migration from a trial balance file",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/quickbooks": {
      "post": {
        "description": "Start an opening-balances migration from QuickBooks Online's own\nexports: the Trial Balance report as of the cutover day and, so accounts\nare matched by type and number too, the Account List. With the A/R and\nA/P Aging Detail reports, every open invoice, bill, credit and unapplied\npayment comes in on its customer or vendor, and the aging is tied out\nparty by party. Refused with `unprocessable` for a file that is not one\nof those reports, or a trial balance with no \"As of\" day and none\ngiven.",
        "operationId": "migrations.create_from_quickbooks",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/create_from_quickbooks"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a migration from QuickBooks reports",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/quickbooks_online": {
      "post": {
        "description": "Start an opening-balances migration from a connected QuickBooks Online\ncompany: its Trial Balance, Account List and A/R and A/P Aging Detail\nreports, read as of the cutover day \u2014 the same reports the export path\nasks a person to download, tied out the same way. Refused with\n`unprocessable` for a connection that is not QuickBooks Online, and with\n`connection_rejected` when QuickBooks refuses the sign-in: connect it\nagain.",
        "operationId": "migrations.create_from_quickbooks_online",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickBooksOnlineStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a migration from a connected QuickBooks Online company",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/xero": {
      "post": {
        "description": "Start an opening-balances migration from Xero's own exports: the\nTrial Balance report as at the cutover day and, so accounts are matched\nby type and code too, the chart of accounts. With the Aged Receivables\nand Aged Payables Detail reports, every open invoice, bill and credit\nnote comes in on its contact, and the aging is tied out party by party.\nEach report is read from Excel or CSV. Refused with `unprocessable` for\na file that is not one of those reports, or a trial balance with no \"As\nat\" day and none given.",
        "operationId": "migrations.create_from_xero",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/create_from_xero"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a migration from Xero reports",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/{migration_id}": {
      "get": {
        "description": "A migration run with where each source account lands and, once posted,\nevery control total: what the old books and these say, and why they\ndiffer where they do.",
        "operationId": "migrations.get",
        "parameters": [
          {
            "in": "path",
            "name": "migration_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mig_`.",
              "examples": [
                "mig_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Migration Id",
              "type": "string",
              "x-id-prefix": "mig"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a migration run and its tie-out",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/{migration_id}/abandon": {
      "post": {
        "description": "Give up a run before it posts. It stays listed, as `abandoned`; one in\nthe books is corrected through its entry instead.",
        "operationId": "migrations.abandon",
        "parameters": [
          {
            "in": "path",
            "name": "migration_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mig_`.",
              "examples": [
                "mig_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Migration Id",
              "type": "string",
              "x-id-prefix": "mig"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Abandon a migration before it posts",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/{migration_id}/control_totals/{control_total_id}": {
      "patch": {
        "description": "Give a control total's difference its reason, or take it back. The run\nis `tied_out` once every difference has one.",
        "operationId": "migrations.explain",
        "parameters": [
          {
            "in": "path",
            "name": "migration_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mig_`.",
              "examples": [
                "mig_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Migration Id",
              "type": "string",
              "x-id-prefix": "mig"
            }
          },
          {
            "in": "path",
            "name": "control_total_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mig_total_`.",
              "examples": [
                "mig_total_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Control Total Id",
              "type": "string",
              "x-id-prefix": "mig_total"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationExplanationIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Explain a difference in a migration's tie-out",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/{migration_id}/mappings": {
      "patch": {
        "description": "Say which account of these books each listed source account lands in\n(null to unmap). Only before the run posts; refused with `conflict`\nafter.",
        "operationId": "migrations.update_mappings",
        "parameters": [
          {
            "in": "path",
            "name": "migration_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mig_`.",
              "examples": [
                "mig_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Migration Id",
              "type": "string",
              "x-id-prefix": "mig"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationMappingsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Map source accounts to these books",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/{migration_id}/parties": {
      "patch": {
        "description": "Say which counterparty of these books each listed source customer or\nvendor is (null to add one by its name when the run posts). Only before\nthe run posts; refused with `conflict` after.",
        "operationId": "migrations.update_parties",
        "parameters": [
          {
            "in": "path",
            "name": "migration_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mig_`.",
              "examples": [
                "mig_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Migration Id",
              "type": "string",
              "x-id-prefix": "mig"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationPartyMappingsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Map source customers and vendors to counterparties",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/migrations/{migration_id}/post": {
      "post": {
        "description": "Put a mapped run into the books, and tie it out. In\n`opening_balances` mode the source trial balance becomes the opening\nbalances as of the cutover day; income and expense before it are\ncarried in retained earnings, and the run says so beside the difference\nthat makes. Open items come in on their receivable or payable, each\nnaming its party and falling due when the old books say, and the AR and\nAP aging is tied out by account and by party. In `full_history` mode\nevery entry of the old books is posted as a `migration` entry, each\nfiscal year before the cutover's is closed into retained earnings, and\nthe trial balance, cash and the receivables and payables are tied out;\nan entry these books refuse is `unprocessable`, naming it. Refused with `conflict`\nwhile accounts are unmapped, when an open item's account is not mapped\nto a receivable or payable, or when another run is already in these\nbooks, and `unprocessable` when the source trial balance does not\nbalance.",
        "operationId": "migrations.post",
        "parameters": [
          {
            "in": "path",
            "name": "migration_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `mig_`.",
              "examples": [
                "mig_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Migration Id",
              "type": "string",
              "x-id-prefix": "mig"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationRunDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Post a migration and tie it out",
        "tags": [
          "migrations"
        ]
      }
    },
    "/v1/model_proposals": {
      "get": {
        "description": "Every category a model proposed in these books, newest first: the\nones that filed themselves, the ones a gate held for a person and the\nones a person overruled, each with the evidence it was shown when the\nbooks researched it.",
        "operationId": "model_proposals.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only the proposals about this transaction.",
            "in": "query",
            "name": "transaction_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `txn_`.",
                  "examples": [
                    "txn_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "txn"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the proposals about this transaction.",
              "title": "Transaction Id"
            }
          },
          {
            "description": "Only proposals with this outcome.",
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "posted",
                    "below_confidence",
                    "above_materiality",
                    "new_counterparty",
                    "invalid"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only proposals with this outcome.",
              "title": "Outcome"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProposalPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what a model proposed for each transaction",
        "tags": [
          "model_proposals"
        ]
      }
    },
    "/v1/model_proposals/{proposal_id}": {
      "get": {
        "description": "One proposal: the account, its confidence and reasoning, what became\nof it, and \u2014 when the books researched an Inbox item \u2014 the evidence the\nmodel was shown and the department and spread it proposed.",
        "operationId": "model_proposals.get",
        "parameters": [
          {
            "in": "path",
            "name": "proposal_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `prop_`.",
              "examples": [
                "prop_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Proposal Id",
              "type": "string",
              "x-id-prefix": "prop"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProposalOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a model proposal with its evidence",
        "tags": [
          "model_proposals"
        ]
      }
    },
    "/v1/notification_preferences": {
      "get": {
        "description": "Where each kind of notification reaches the caller in these books: in\nthe app, by email, in Slack, on WhatsApp, or nowhere.",
        "operationId": "notification_preferences.get",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get where each kind of notification goes",
        "tags": [
          "notification_preferences"
        ]
      },
      "patch": {
        "description": "Choose where kinds of notification reach the caller, in these books\nonly: a whole category off or back on, or one kind's channels. A kind\nturned off everywhere is not written at all, so nothing arrives when it\nis turned back on. Safe to repeat.",
        "operationId": "notification_preferences.update",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationPreferencesIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Choose where kinds of notification go",
        "tags": [
          "notification_preferences"
        ]
      }
    },
    "/v1/notifications": {
      "get": {
        "description": "The caller's notifications in these books, newest first, with how many\nare unread.",
        "operationId": "notifications.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only the ones not read yet.",
            "in": "query",
            "name": "unread_only",
            "required": false,
            "schema": {
              "default": false,
              "description": "Only the ones not read yet.",
              "title": "Unread Only",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the caller's notifications",
        "tags": [
          "notifications"
        ]
      }
    },
    "/v1/notifications/read": {
      "post": {
        "description": "Mark some of the caller's notifications read, or all of them. Safe to\nrepeat: one already read stays read.",
        "operationId": "notifications.mark_read",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkReadIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkReadOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mark notifications read",
        "tags": [
          "notifications"
        ]
      }
    },
    "/v1/notifications/{notification_id}": {
      "delete": {
        "description": "Dismiss one of the caller's notifications: it leaves their inbox for\ngood, and the same notice is not sent to them again. Theirs only.",
        "operationId": "notifications.dismiss",
        "parameters": [
          {
            "in": "path",
            "name": "notification_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `ntf_`.",
              "examples": [
                "ntf_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Notification Id",
              "type": "string",
              "x-id-prefix": "ntf"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Dismiss a notification",
        "tags": [
          "notifications"
        ]
      },
      "get": {
        "description": "One of the caller's notifications.",
        "operationId": "notifications.get",
        "parameters": [
          {
            "in": "path",
            "name": "notification_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `ntf_`.",
              "examples": [
                "ntf_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Notification Id",
              "type": "string",
              "x-id-prefix": "ntf"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a notification",
        "tags": [
          "notifications"
        ]
      }
    },
    "/v1/open_items": {
      "get": {
        "description": "Receivable and payable items of these books: every AR or AP line that\nnames its party, with what it has left after allocations.",
        "operationId": "open_items.list",
        "parameters": [
          {
            "description": "`ar` or `ap`; both when left out.",
            "in": "query",
            "name": "ledger",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`ar` or `ap`; both when left out.",
              "title": "Ledger"
            }
          },
          {
            "description": "Only this counterparty's items.",
            "in": "query",
            "name": "party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this counterparty's items.",
              "title": "Party Id"
            }
          },
          {
            "description": "Only items with something left.",
            "in": "query",
            "name": "open_only",
            "required": false,
            "schema": {
              "default": true,
              "description": "Only items with something left.",
              "title": "Open Only",
              "type": "boolean"
            }
          },
          {
            "description": "What each had left on this day; today when left out.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What each had left on this day; today when left out.",
              "title": "As Of"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenItemPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List receivable and payable items",
        "tags": [
          "open_items"
        ]
      }
    },
    "/v1/open_items/{item_id}": {
      "get": {
        "description": "An open item with every allocation that settled it, or undid one.",
        "operationId": "open_items.get",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `oi_`.",
              "examples": [
                "oi_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Item Id",
              "type": "string",
              "x-id-prefix": "oi"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenItemDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an open item and its allocations",
        "tags": [
          "open_items"
        ]
      }
    },
    "/v1/opening_balances": {
      "get": {
        "description": "What every balance-sheet account held before these books began.",
        "operationId": "opening_balances.get",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpeningBalancesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the opening balances",
        "tags": [
          "opening_balances"
        ]
      },
      "post": {
        "description": "Replace the opening balances, as one entry against opening balance\nequity. The entry that stood before is reversed, not edited.\n\nRefused with `opening_balance_invalid` for an income or expense account,\nand with `period_closed` when the month it lands in is closed.",
        "operationId": "opening_balances.set",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetOpeningBalances"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpeningBalancesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set the opening balances",
        "tags": [
          "opening_balances"
        ]
      }
    },
    "/v1/payment_destinations": {
      "get": {
        "description": "Where vendors are paid, the newest first, superseded versions\nincluded.",
        "operationId": "payment_destinations.list",
        "parameters": [
          {
            "description": "Only this vendor's destinations.",
            "in": "query",
            "name": "party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this vendor's destinations.",
              "title": "Party Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List payment destinations",
        "tags": [
          "payment_destinations"
        ]
      },
      "post": {
        "description": "Add where a vendor is paid: a new version, unverified, that\nsupersedes the one before. Nothing can be sent there until a person who\nmay approve money verifies it.",
        "operationId": "payment_destinations.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DestinationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add where a vendor is paid",
        "tags": [
          "payment_destinations"
        ]
      }
    },
    "/v1/payment_destinations/{destination_id}": {
      "get": {
        "description": "One destination, as much of it as may be shown.",
        "operationId": "payment_destinations.get",
        "parameters": [
          {
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dest_`.",
              "examples": [
                "dest_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Destination Id",
              "type": "string",
              "x-id-prefix": "dest"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a payment destination",
        "tags": [
          "payment_destinations"
        ]
      }
    },
    "/v1/payment_destinations/{destination_id}/block": {
      "post": {
        "description": "Never send anything here again. Needs `money.approve`.",
        "operationId": "payment_destinations.block",
        "parameters": [
          {
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dest_`.",
              "examples": [
                "dest_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Destination Id",
              "type": "string",
              "x-id-prefix": "dest"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Block a payment destination",
        "tags": [
          "payment_destinations"
        ]
      }
    },
    "/v1/payment_destinations/{destination_id}/verify": {
      "post": {
        "description": "Say the details were confirmed with the vendor, and how. Needs\n`money.approve`.",
        "operationId": "payment_destinations.verify",
        "parameters": [
          {
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `dest_`.",
              "examples": [
                "dest_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Destination Id",
              "type": "string",
              "x-id-prefix": "dest"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DestinationVerify"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Verify a payment destination",
        "tags": [
          "payment_destinations"
        ]
      }
    },
    "/v1/payments": {
      "get": {
        "description": "The payments of these books, the newest first, each with what it is\napplied to and what is left unapplied.",
        "operationId": "payments.list",
        "parameters": [
          {
            "description": "Only `in` or `out` payments.",
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `in` or `out` payments.",
              "title": "Direction"
            }
          },
          {
            "description": "Only `customer` or `vendor` payments.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `customer` or `vendor` payments.",
              "title": "Kind"
            }
          },
          {
            "description": "Only this party's payments.",
            "in": "query",
            "name": "party_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this party's payments.",
              "title": "Party Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List payments",
        "tags": [
          "payments"
        ]
      },
      "post": {
        "description": "Record a payment that happened: money in from a customer, or out to a\nvendor, through a bank, cash or card account. It is posted on its day and\napplied to the invoices or bills listed (or the oldest first); whatever is\nnot applied stays open as unapplied cash.",
        "operationId": "payments.record",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Record a payment received or made",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/payments/send": {
      "post": {
        "description": "Write a payment to a vendor that LedgerIt will send, to one of the\nvendor's destinations. It is `created`: nothing is sent and nothing is on\nthe books. It leaves `created` only once a person who may approve money\nhas approved it as it then is, and its destination is verified.",
        "operationId": "payments.create_to_send",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentSend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Write a payment to send",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/payments/{payment_id}": {
      "get": {
        "description": "One payment, what it is applied to and what is left unapplied.",
        "operationId": "payments.get",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `pay_`.",
              "examples": [
                "pay_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Payment Id",
              "type": "string",
              "x-id-prefix": "pay"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a payment",
        "tags": [
          "payments"
        ]
      },
      "patch": {
        "description": "Change a payment not yet released: its amount, day, account,\ndestination, reference or memo. Any approval of it stops standing, since\nit approved something else: ask again. Refused with `conflict` once it is\nreleased, and for a recorded payment.",
        "operationId": "payments.update",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `pay_`.",
              "examples": [
                "pay_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Payment Id",
              "type": "string",
              "x-id-prefix": "pay"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a payment not yet released",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/payments/{payment_id}/apply": {
      "post": {
        "description": "Apply what is left of a payment to invoices or bills of the same\nparty: those listed, for the amounts given, or the oldest first.",
        "operationId": "payments.apply",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `pay_`.",
              "examples": [
                "pay_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Payment Id",
              "type": "string",
              "x-id-prefix": "pay"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentApply"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Apply a payment to invoices or bills",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/payments/{payment_id}/cancel": {
      "post": {
        "description": "Give up a payment not yet released. It stays listed as `cancelled`.",
        "operationId": "payments.cancel",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `pay_`.",
              "examples": [
                "pay_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Payment Id",
              "type": "string",
              "x-id-prefix": "pay"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Cancel a payment not yet released",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/payments/{payment_id}/release": {
      "post": {
        "description": "Release a payment to be sent: out of `created`, refused with\n`conflict` unless an approval of exactly what it now is stands and has\nnot expired, and its destination is verified. A released payment due by\ntoday is sent through the provider of the account it is paid from, once;\none due later is sent on its day.",
        "operationId": "payments.release",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `pay_`.",
              "examples": [
                "pay_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Payment Id",
              "type": "string",
              "x-id-prefix": "pay"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Release an approved payment to be sent",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/payments/{payment_id}/request_approval": {
      "post": {
        "description": "Ask for approval of the payment as it now is. A person with\n`money.approve` decides it at `/v1/approvals/{id}/decide`; it expires\nafter the hours given (72 by default).",
        "operationId": "payments.request_approval",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `pay_`.",
              "examples": [
                "pay_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Payment Id",
              "type": "string",
              "x-id-prefix": "pay"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalAsk"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ask for a payment's approval",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/payments/{payment_id}/void": {
      "post": {
        "description": "Take a payment off the books by reversing its entry. Refused with\n`conflict` while any of it is applied: undo those allocations first.",
        "operationId": "payments.void",
        "parameters": [
          {
            "in": "path",
            "name": "payment_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `pay_`.",
              "examples": [
                "pay_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Payment Id",
              "type": "string",
              "x-id-prefix": "pay"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentVoid"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Void a recorded payment",
        "tags": [
          "payments"
        ]
      }
    },
    "/v1/people/{user_id}": {
      "get": {
        "description": "Who a contributor is in these books: their name, picture and role\nwhile they are a member. Someone who has left keeps their work, under\ntheir id alone. Anyone who never worked in these books is not found.",
        "operationId": "people.get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `usr_`.",
              "examples": [
                "usr_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "User Id",
              "type": "string",
              "x-id-prefix": "usr"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get who a contributor is in the books",
        "tags": [
          "people"
        ]
      }
    },
    "/v1/periods": {
      "get": {
        "description": "The months these books have, newest first. A month appears once\nsomething is dated in it or it is closed; `GET /periods/{key}` describes\nany month, listed or not.",
        "operationId": "periods.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only open months, or only closed ones.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "open",
                    "soft_closed",
                    "locked"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only open months, or only closed ones.",
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeriodPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the months of the books",
        "tags": [
          "periods"
        ]
      }
    },
    "/v1/periods/{key}": {
      "get": {
        "description": "Everything the close screen needs, in one call.\n\nDeliberately one call: a close screen assembled from six requests shows six\ndifferent moments, and the whole value of the page is that its parts agree.\n\nRead-only, and open to viewers. It creates no period and raises or clears\nno exception: it once did both, so a viewer opening an old month created\nan open period there and blocked every later close. A month with no period\nyet is described as it would be created.",
        "operationId": "periods.get",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseStatusOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a month's close status",
        "tags": [
          "periods"
        ]
      }
    },
    "/v1/periods/{key}/account_reviews": {
      "get": {
        "description": "Every account a month's close reviews against its support: each asset\nand liability with a balance at the month's end (bank and card accounts\nare reconciled instead), with its review when it has one.",
        "operationId": "account_reviews.list_for_period",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonthReviewsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the accounts a month's close reviews",
        "tags": [
          "account_reviews"
        ]
      }
    },
    "/v1/periods/{key}/close": {
      "post": {
        "description": "Close a period. Afterwards the ledger refuses to change anything in it.",
        "operationId": "periods.close",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeriodOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Close (lock) a month",
        "tags": [
          "periods"
        ]
      }
    },
    "/v1/periods/{key}/close_run": {
      "post": {
        "description": "Start a month's close: a run asking for every task on the checklist. A\nmonth whose close is already being worked returns that run. Signing off a\ntask or closing the month starts it too. Refused with `period_closed` in\na closed month.",
        "operationId": "close_runs.start",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseRunOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a month's close run",
        "tags": [
          "close_runs"
        ]
      }
    },
    "/v1/periods/{key}/close_tasks/{task_id}/sign_off": {
      "delete": {
        "description": "Take back a task's sign-off for one month, on the record. Refused with\n`close_task_waiting` while a task done after it is signed off, and with\n`period_closed` once the month is closed; reopen it first.",
        "operationId": "close_tasks.undo_sign_off",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Task Id",
              "type": "string",
              "x-id-prefix": "task"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Take back a close task's sign-off for a month",
        "tags": [
          "close_tasks"
        ]
      },
      "post": {
        "description": "Sign a task off for one month, on the record, starting the month's\nclose run if it has none. Safe to repeat: a task already signed off keeps\nits first sign-off. Refused with `close_task_waiting` while a task it is\ndone after is not signed off, and with `period_closed` once the month is\nclosed.",
        "operationId": "close_tasks.sign_off",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `task_`.",
              "examples": [
                "task_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Task Id",
              "type": "string",
              "x-id-prefix": "task"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignOffRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChecklistItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Sign a close task off for a month",
        "tags": [
          "close_tasks"
        ]
      }
    },
    "/v1/periods/{key}/closes": {
      "get": {
        "description": "Every close of the month, oldest first, and the reopening that undid\neach one but the standing close. A reopen never erases a close: the\nfigures it recorded stay here.",
        "operationId": "periods.list_closes",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeriodCloseList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List every close of a month, reopenings included",
        "tags": [
          "periods"
        ]
      }
    },
    "/v1/periods/{key}/preview": {
      "get": {
        "description": "The entries closing a month would post, before it is closed.\n\nEach recognition schedule's share for the month (prepaids, deferred\nrevenue, accruals and their releases, depreciation), interest on notes and\nventure debt, stock-based compensation and, in a fiscal year's last month,\nthe year-end entry. They come from rehearsing the close itself and rolling\nit back, so they are exactly what **Close month** would post as the books\nstand now, and nothing is written. Refused like the close for a month\nstill running or after a month still open; it needs the close's\npermission because it holds the close's locks while it runs.\n\nWith them, the accounts whose month swung from its usual month, read from\nthe books as closing leaves them, each explained by what moved it: a\nschedule, a vendor or customer, or what posted the rest (decision 0148).\nAnd the vendors whose monthly, quarterly or yearly bill was due in the\nmonth and has not come, each with the Inbox item that accrues it\n(decisions 0149, 0152).",
        "operationId": "periods.preview_close",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClosePreviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Preview the entries closing a month would post",
        "tags": [
          "periods"
        ]
      }
    },
    "/v1/periods/{key}/reopen": {
      "post": {
        "description": "Reopen a closed period, on the record.\n\nDeliberately possible. A product that makes a real mistake in a closed month\nunfixable gets worked around with a compensating entry in the wrong period,\nwhich is worse than the restatement it was trying to prevent.",
        "operationId": "periods.reopen",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReopenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeriodOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Reopen a closed month",
        "tags": [
          "periods"
        ]
      }
    },
    "/v1/periods/{key}/soft_close": {
      "post": {
        "description": "Soft-close a month that has ended: people can still post and correct\nin it, but transactions from connected accounts wait until it reopens or\nlocks. Locking it is `POST /periods/{key}/close`; `POST\n/periods/{key}/reopen` opens it again.",
        "operationId": "periods.soft_close",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeriodOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Soft-close a month: the feed waits while it is reviewed",
        "tags": [
          "periods"
        ]
      }
    },
    "/v1/qa_tolerances": {
      "get": {
        "description": "The vendors a books check is wider for, the newest first: which\ncheck, and by how much.",
        "operationId": "qa_tolerances.list",
        "parameters": [
          {
            "description": "Only those widening this check.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "unusual_amount",
                    "possible_repeat",
                    "missing_accrual"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those widening this check.",
              "title": "Kind"
            }
          },
          {
            "description": "Only this vendor's.",
            "in": "query",
            "name": "counterparty_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this vendor's.",
              "title": "Counterparty Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QaTolerancePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the vendors a books check is wider for",
        "tags": [
          "qa_tolerances"
        ]
      },
      "post": {
        "description": "Widen one check for one vendor, by a multiple of its threshold. A\nvendor has one tolerance per check: change it by deleting it and setting\nanother, or by dismissing an item with \"This vendor varies\".",
        "operationId": "qa_tolerances.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QaToleranceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QaToleranceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Widen a books check for one vendor",
        "tags": [
          "qa_tolerances"
        ]
      }
    },
    "/v1/qa_tolerances/{tolerance_id}": {
      "delete": {
        "description": "Put the vendor back on the check's default threshold.",
        "operationId": "qa_tolerances.delete",
        "parameters": [
          {
            "in": "path",
            "name": "tolerance_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `qa_tol_`.",
              "examples": [
                "qa_tol_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Tolerance Id",
              "type": "string",
              "x-id-prefix": "qa_tol"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Put a vendor back on a check's default threshold",
        "tags": [
          "qa_tolerances"
        ]
      },
      "get": {
        "description": "One vendor's tolerance on one check.",
        "operationId": "qa_tolerances.get",
        "parameters": [
          {
            "in": "path",
            "name": "tolerance_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `qa_tol_`.",
              "examples": [
                "qa_tol_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Tolerance Id",
              "type": "string",
              "x-id-prefix": "qa_tol"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QaToleranceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a vendor's tolerance on a books check",
        "tags": [
          "qa_tolerances"
        ]
      }
    },
    "/v1/questions": {
      "get": {
        "description": "Questions, newest first: one record's, those waiting on someone, or\nevery one in the books.",
        "operationId": "questions.list",
        "parameters": [
          {
            "description": "What the questions are about.",
            "in": "query",
            "name": "about",
            "required": false,
            "schema": {
              "default": "transaction",
              "description": "What the questions are about.",
              "enum": [
                "transaction",
                "journal_entry"
              ],
              "title": "About",
              "type": "string"
            }
          },
          {
            "description": "One record's questions.",
            "in": "query",
            "name": "subject_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id. Which resource it names is given by the field beside it.",
                  "examples": [
                    "je_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "*"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One record's questions.",
              "title": "Subject Id"
            }
          },
          {
            "description": "Only questions in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "open",
                    "answered",
                    "closed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only questions in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Only those asked of this member; `me` for the caller.",
            "in": "query",
            "name": "asked_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those asked of this member; `me` for the caller.",
              "title": "Asked Of"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List questions about records",
        "tags": [
          "questions"
        ]
      },
      "post": {
        "description": "Ask a member a question about a record. They are told, and it waits\non their Home until they answer.\n\nThe same question is never asked twice: a question about a transaction\nno person or rule has decided, that one of the books' rules covers, is\nnot sent. The rule files it, and the answer is `200` with `outcome:\nfiled_by_rule` naming the rule. `ask_anyway` sends it regardless.",
        "operationId": "questions.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewQuestion"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/QuestionOut"
                    },
                    {
                      "$ref": "#/components/schemas/FiledByRuleOut"
                    }
                  ],
                  "title": "Response Questions.Create"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ask a member a question",
        "tags": [
          "questions"
        ]
      }
    },
    "/v1/questions/{question_id}": {
      "get": {
        "description": "One question, and its answer once there is one.",
        "operationId": "questions.get",
        "parameters": [
          {
            "in": "path",
            "name": "question_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `qst_`.",
              "examples": [
                "qst_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Question Id",
              "type": "string",
              "x-id-prefix": "qst"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a question and its answer",
        "tags": [
          "questions"
        ]
      }
    },
    "/v1/questions/{question_id}/answer": {
      "post": {
        "description": "Answer a question you were asked. Whoever asked is told.\n\nOn a question about a transaction, the answer can also file it: with\n`account_id` the transaction is filed there, as filing it by hand does,\nand the question is closed. With `rule` (\"Do this every time\") a rule is\nwritten from the answer first \u2014 the transaction's counterparty, plus the\nmemo words and paper given \u2014 so the next transaction like it is filed\nwith no question and no model. The rule's account is checked when it is\nwritten: a header or closed account is refused, nothing is filed, and\nthe answer is still kept, with `filing_refused` saying why. Filing needs\n`books.post`.",
        "operationId": "questions.answer",
        "parameters": [
          {
            "in": "path",
            "name": "question_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `qst_`.",
              "examples": [
                "qst_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Question Id",
              "type": "string",
              "x-id-prefix": "qst"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Answer a question you were asked",
        "tags": [
          "questions"
        ]
      }
    },
    "/v1/questions/{question_id}/close": {
      "post": {
        "description": "Close a question nobody needs any more, answered or not.",
        "operationId": "questions.close",
        "parameters": [
          {
            "in": "path",
            "name": "question_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `qst_`.",
              "examples": [
                "qst_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Question Id",
              "type": "string",
              "x-id-prefix": "qst"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Close a question",
        "tags": [
          "questions"
        ]
      }
    },
    "/v1/receipt_inbox": {
      "get": {
        "description": "The address to forward receipts to. Each PDF or photo attached to an\nemail sent there by a member who may attach receipts becomes a document,\nread and matched like an upload; email from anyone else is refused.",
        "operationId": "receipt_inbox.get",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptInboxOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the address to forward receipts to",
        "tags": [
          "receipt_inbox"
        ]
      }
    },
    "/v1/receipt_inbox/emails": {
      "get": {
        "description": "Emails forwarded to the books' address, newest first, with what became\nof each.",
        "operationId": "receipt_inbox.list_emails",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptEmailPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the emails forwarded to the books",
        "tags": [
          "receipt_inbox"
        ]
      }
    },
    "/v1/receipt_inbox/rotate": {
      "post": {
        "description": "Replace the address with a new one. The old one reaches nothing from\nnow on: for an address that has been shared where it should not be.",
        "operationId": "receipt_inbox.rotate",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptInboxOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Replace the receipt forwarding address",
        "tags": [
          "receipt_inbox"
        ]
      }
    },
    "/v1/receipt_request_settings": {
      "get": {
        "description": "Whether the books ask cardholders for missing receipts on their own.",
        "operationId": "receipt_requests.get_settings",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRequestSettingsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get whether the books ask cardholders",
        "tags": [
          "receipt_requests"
        ]
      },
      "put": {
        "description": "Turn asking cardholders on their own on or off. Requests already made\ncarry on; turned off, a person asks from the Inbox.",
        "operationId": "receipt_requests.set_settings",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRequestSettingsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRequestSettingsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Turn asking cardholders on or off",
        "tags": [
          "receipt_requests"
        ]
      }
    },
    "/v1/receipt_requests": {
      "get": {
        "description": "The receipts asked of cardholders, the newest first, with what each\ncame to.",
        "operationId": "receipt_requests.list",
        "parameters": [
          {
            "description": "Only this charge's requests.",
            "in": "query",
            "name": "transaction_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `txn_`.",
                  "examples": [
                    "txn_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "txn"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this charge's requests.",
              "title": "Transaction Id"
            }
          },
          {
            "description": "Only `open`, `completed`, `cancelled` or `expired` ones.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "open",
                    "completed",
                    "cancelled",
                    "expired"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `open`, `completed`, `cancelled` or `expired` ones.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRequestPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the receipts asked of cardholders",
        "tags": [
          "receipt_requests"
        ]
      },
      "post": {
        "description": "Ask the cardholder for a charge's receipt. They are emailed a link to\na page that needs no account and works for 30 days, where they upload a\nphoto or a PDF; it is attached to the charge and read like any receipt.\nReminders follow on day 3 and day 7. The charge's `missing_receipt` item\nwaits on them meanwhile. Asking again cancels the open request, and its\nlink stops working. `emailed` says whether the email went; when it did\nnot, the request is open all the same and the books try again. A\ncardholder who is a member of the books is not emailed: they upload the\nreceipt from their Inbox, and asking them without an `email` is refused\n(409).",
        "operationId": "receipt_requests.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRequestCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ask a cardholder for a charge's receipt",
        "tags": [
          "receipt_requests"
        ]
      }
    },
    "/v1/receipt_requests/{request_id}": {
      "get": {
        "description": "One receipt request, and what it came to.",
        "operationId": "receipt_requests.get",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rcpt_req_`.",
              "examples": [
                "rcpt_req_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Request Id",
              "type": "string",
              "x-id-prefix": "rcpt_req"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a receipt request",
        "tags": [
          "receipt_requests"
        ]
      }
    },
    "/v1/receipt_requests/{request_id}/cancel": {
      "post": {
        "description": "Stop an open request's link working. The charge's `missing_receipt`\nitem goes back to the owner. Settled requests stay as they are.",
        "operationId": "receipt_requests.cancel",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rcpt_req_`.",
              "examples": [
                "rcpt_req_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Request Id",
              "type": "string",
              "x-id-prefix": "rcpt_req"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Cancel a receipt request",
        "tags": [
          "receipt_requests"
        ]
      }
    },
    "/v1/receipt_requests/{request_id}/resend": {
      "post": {
        "description": "Email an open request's link again, now. Not twice within a day: a\ncardholder emailed less than a day ago is refused (409).",
        "operationId": "receipt_requests.resend",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rcpt_req_`.",
              "examples": [
                "rcpt_req_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Request Id",
              "type": "string",
              "x-id-prefix": "rcpt_req"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Email a receipt request again",
        "tags": [
          "receipt_requests"
        ]
      }
    },
    "/v1/receipt_searches/{transaction_id}": {
      "get": {
        "description": "The mailboxes a transaction's receipt can be looked for in, and how\nthe search a person asked for is going in each.",
        "operationId": "receipt_searches.get",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Transaction Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptSearchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get how the mailbox search for a transaction's receipt is going",
        "tags": [
          "receipt_searches"
        ]
      },
      "post": {
        "description": "Look for one transaction's receipt in every connected mailbox now, in\nthe background, whether or not the books are missing it. A receipt found\nis attached to the transaction. Read the search back until `searching`\nis false. Asking again while it runs changes nothing.",
        "operationId": "receipt_searches.start",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Transaction Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptSearchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Search connected mailboxes for a transaction's receipt",
        "tags": [
          "receipt_searches"
        ]
      }
    },
    "/v1/reconciliation_matches": {
      "get": {
        "description": "Matches between statement lines and ledger lines, the newest first,\nundone ones included.",
        "operationId": "reconciliation_matches.list",
        "parameters": [
          {
            "description": "Only this statement's matches.",
            "in": "query",
            "name": "statement_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `stmt_`.",
                  "examples": [
                    "stmt_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "stmt"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this statement's matches.",
              "title": "Statement Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationMatchPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List statement-to-ledger matches",
        "tags": [
          "reconciliation_matches"
        ]
      },
      "post": {
        "description": "Match statement lines to ledger lines by hand: any lines of one\nstatement and any lines posted to its account, whole, whose totals are\nequal. Refused with `match_refused` for lines already matched, of another\nstatement or account, or totals that differ.",
        "operationId": "reconciliation_matches.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconciliationMatchCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationMatchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Match statement lines to ledger lines by hand",
        "tags": [
          "reconciliation_matches"
        ]
      }
    },
    "/v1/reconciliation_matches/{match_id}": {
      "get": {
        "description": "A match and the lines it joins.",
        "operationId": "reconciliation_matches.get",
        "parameters": [
          {
            "in": "path",
            "name": "match_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `match_`.",
              "examples": [
                "match_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Match Id",
              "type": "string",
              "x-id-prefix": "match"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationMatchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a match and its lines",
        "tags": [
          "reconciliation_matches"
        ]
      }
    },
    "/v1/reconciliation_matches/{match_id}/undo": {
      "post": {
        "description": "Free the lines a match joined. The match stays, `undone`; its\nstatement is `imported` again until every line is matched.",
        "operationId": "reconciliation_matches.undo",
        "parameters": [
          {
            "in": "path",
            "name": "match_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `match_`.",
              "examples": [
                "match_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Match Id",
              "type": "string",
              "x-id-prefix": "match"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationMatchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Undo a match",
        "tags": [
          "reconciliation_matches"
        ]
      }
    },
    "/v1/reconciliations": {
      "get": {
        "description": "Every comparison of an account against a statement, newest first: the\ntwo balances, the difference and whether they agreed. An attempt is never\nedited; a later one for the same date stands in its place and both stay.",
        "operationId": "reconciliations.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only this account's reconciliations.",
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this account's reconciliations.",
              "title": "Account Id"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List an account's reconciliations",
        "tags": [
          "reconciliations"
        ]
      },
      "post": {
        "description": "Compare an account against a statement figure, and record the result.\n\nA difference raises an exception that blocks the close. That is the point:\nit is the only check in the system that can catch a transaction the ledger\nnever saw.",
        "operationId": "reconciliations.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconcileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconcileResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Reconcile an account against its statement",
        "tags": [
          "reconciliations"
        ]
      }
    },
    "/v1/report_runs": {
      "get": {
        "description": "Kept reports, the newest first: those kept by hand, and those each close\nkept of its month.",
        "operationId": "report_runs.list",
        "parameters": [
          {
            "description": "Only runs of this report.",
            "in": "query",
            "name": "report",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "trial_balance",
                    "balance_sheet",
                    "income_statement",
                    "cash_flow",
                    "board_pack"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only runs of this report.",
              "title": "Report"
            }
          },
          {
            "description": "Only the reports this close run kept when its month closed.",
            "in": "query",
            "name": "close_run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `close_run_`.",
                  "examples": [
                    "close_run_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "close_run"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the reports this close run kept when its month closed.",
              "title": "Close Run Id"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRunPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List kept reports",
        "tags": [
          "report_runs"
        ]
      },
      "post": {
        "description": "Keep a report as it stands now: the books read through their latest\nposting sequence, and the manifest recorded so it can be produced again\nexactly. Any member may keep one, a viewer included; a read-only API key\nmay not, since keeping is a write.",
        "operationId": "report_runs.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRunCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRunWithReportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Keep a report",
        "tags": [
          "report_runs"
        ]
      }
    },
    "/v1/report_runs/{run_id}": {
      "get": {
        "description": "A kept report, produced again from its manifest, with whether it says\nexactly what it said when it was kept.",
        "operationId": "report_runs.get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rpt_run_`.",
              "examples": [
                "rpt_run_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Run Id",
              "type": "string",
              "x-id-prefix": "rpt_run"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRunWithReportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Produce a kept report again",
        "tags": [
          "report_runs"
        ]
      }
    },
    "/v1/report_runs/{run_id}/explain": {
      "get": {
        "description": "Why a figure in a kept report is what it is: every journal line behind\nit, read through the posting sequence the report was, with the entry each\nbelongs to and the transactions and documents behind that entry. Name an\naccount, or a figure.\n\nFor a report over a window (the income statement, the cash flow statement,\na board pack's figures) the figure is what the lines moved, closing\nentries left out. For a report as of a day (the balance sheet, the trial\nbalance) and for cash, it is the balance on the day: the opening balance,\nthen the lines of the month the day ends. The newest 500 lines are listed.",
        "operationId": "report_runs.explain",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rpt_run_`.",
              "examples": [
                "rpt_run_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Run Id",
              "type": "string",
              "x-id-prefix": "rpt_run"
            }
          },
          {
            "description": "The account whose figure to explain. A header account is its whole subtree.",
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The account whose figure to explain. A header account is its whole subtree.",
              "title": "Account Id"
            }
          },
          {
            "description": "A figure that is not one account's: `cash`, or `mrr` for a report over a window.",
            "in": "query",
            "name": "figure",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "cash",
                    "mrr"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A figure that is not one account's: `cash`, or `mrr` for a report over a window.",
              "title": "Figure"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplanationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Explain a figure in a kept report",
        "tags": [
          "report_runs"
        ]
      }
    },
    "/v1/reports/1099": {
      "get": {
        "description": "What each 1099-eligible vendor was paid in a calendar year, against the\nyear's filing threshold ($600 through 2025, $2,000 from 2026), and whether\ntheir W-9 and tax id are on file. Money paid by card is left out: the card\nnetwork reports it. Turn `eligible_only` off to see every other vendor paid\nthe threshold, who may need marking.",
        "operationId": "reports.form_1099",
        "parameters": [
          {
            "description": "The calendar year; last year when left out.",
            "in": "query",
            "name": "year",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 2100,
                  "minimum": 2000,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The calendar year; last year when left out.",
              "title": "Year"
            }
          },
          {
            "description": "Only vendors marked 1099-eligible. Off, every other vendor paid the threshold is listed too.",
            "in": "query",
            "name": "eligible_only",
            "required": false,
            "schema": {
              "default": true,
              "description": "Only vendors marked 1099-eligible. Off, every other vendor paid the threshold is listed too.",
              "title": "Eligible Only",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Form1099YearOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get what each vendor was paid for their 1099",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/aging": {
      "get": {
        "description": "Receivables (or payables) on a day, by counterparty and by how far\npast due: not yet due, 1\u201330, 31\u201360, 61\u201390 and over 90 days. A payment\nnot yet applied counts against its party in `current`.",
        "operationId": "reports.aging",
        "parameters": [
          {
            "description": "`ar` for receivables, `ap` for payables.",
            "in": "query",
            "name": "ledger",
            "required": false,
            "schema": {
              "default": "ar",
              "description": "`ar` for receivables, `ap` for payables.",
              "title": "Ledger",
              "type": "string"
            }
          },
          {
            "description": "The day; today when left out.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The day; today when left out.",
              "title": "As Of"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgingOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get receivables or payables by age",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/balance_history": {
      "get": {
        "description": "Total assets, total liabilities and net assets at each date from\n`since` to `until`, and every asset and liability account's balance at\nthe same dates, grouped under its top-level account. Each point equals the\nbalance sheet's totals as of that date. The history never starts before\nthe books' first entry: `since` is moved up to it.",
        "operationId": "reports.balance_history",
        "parameters": [
          {
            "description": "First day. Defaults to the day the books start.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "First day. Defaults to the day the books start.",
              "title": "Since"
            }
          },
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "Until"
            }
          },
          {
            "description": "One point per day, or per week or month end (the last point is always `until`). At most 1000 points. Defaults to the finest interval that fits.",
            "in": "query",
            "name": "interval",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "day",
                    "week",
                    "month"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One point per day, or per week or month end (the last point is always `until`). At most 1000 points. Defaults to the finest interval that fits.",
              "title": "Interval"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceHistoryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get assets, liabilities and net assets over time",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/balance_sheet": {
      "get": {
        "description": "Assets, liabilities and equity as of `as_of` (today by default). Both\nsides are computed independently and any difference is reported.",
        "operationId": "reports.balance_sheet",
        "parameters": [
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "As Of"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceSheetOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the balance sheet",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/burn": {
      "get": {
        "description": "Cash, gross and net burn by month, and runway: cash divided by the\naverage net burn of the last three complete months. Transfers between the\ncompany's own accounts, money raised and equipment bought are not burn.",
        "operationId": "reports.burn",
        "parameters": [
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "As Of"
            }
          },
          {
            "description": "How many months of burn to return, the current month included.",
            "in": "query",
            "name": "months",
            "required": false,
            "schema": {
              "default": 6,
              "description": "How many months of burn to return, the current month included.",
              "maximum": 24,
              "minimum": 1,
              "title": "Months",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BurnAndRunwayOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get burn and runway",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/cash_flow": {
      "get": {
        "description": "The indirect cash flow statement between `since` and `until` (this\nmonth to date by default): net income, then operating, investing and financing\nmovements, reconciled to what the cash accounts did.",
        "operationId": "reports.cash_flow",
        "parameters": [
          {
            "description": "Defaults to the start of this month.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to the start of this month.",
              "title": "Since"
            }
          },
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "Until"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashFlowStatementOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the cash flow statement",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/consolidation": {
      "get": {
        "description": "The organization's consolidated balance sheet and income statement,\nin these books' currency.\n\nEach set of books is read from its own ledger, translated (balance sheet\nat the closing rate, income and expense at the period's average, from\nthese books' rates) and added up by account code; intercompany balances\nbetween them are eliminated. Refused with `consolidation_refused` when\nthe organization has books you cannot open, a currency has no rate in\nthese books, or for an API key, which reaches only its own books.",
        "operationId": "reports.consolidation",
        "parameters": [
          {
            "description": "The balance sheet date. Defaults to today.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The balance sheet date. Defaults to today.",
              "title": "As Of"
            }
          },
          {
            "description": "The first day of the income statement. Defaults to the fiscal year's.",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The first day of the income statement. Defaults to the fiscal year's.",
              "title": "Start"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsolidationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the organization's consolidated balance sheet and income statement",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/income_statement": {
      "get": {
        "description": "Revenue, cost of revenue, gross profit, operating expenses by function\nand net income between `since` and `until` (this month to date by default).",
        "operationId": "reports.income_statement",
        "parameters": [
          {
            "description": "Defaults to the start of this month.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to the start of this month.",
              "title": "Since"
            }
          },
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "Until"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncomeStatementOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the income statement",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/spend_by_department": {
      "get": {
        "description": "Operating expenses by department between `since` and `until` (this\nmonth to date by default), payroll included: what each team spent, and\nwhat names no team yet.",
        "operationId": "reports.spend_by_department",
        "parameters": [
          {
            "description": "Defaults to the start of this month.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to the start of this month.",
              "title": "Since"
            }
          },
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "Until"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendByDepartmentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get operating expenses by department",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/tax_lines": {
      "get": {
        "description": "The books by Form 1120 line for a fiscal year: page 1 from the year's\nincome and expense, Schedule L from the balances at its start and end\n(this year's unclosed result in retained earnings), and Schedule M-1's\nbook income tax. Each line lists its accounts.",
        "operationId": "reports.tax_lines",
        "parameters": [
          {
            "description": "The calendar year the fiscal year ends in; the current one when left out.",
            "in": "query",
            "name": "fiscal_year",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 2999,
                  "minimum": 1900,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The calendar year the fiscal year ends in; the current one when left out.",
              "title": "Fiscal Year"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxReportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the books by tax line for a fiscal year",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/trial_balance": {
      "get": {
        "description": "Every account's debit or credit balance as of `as_of` (today by\ndefault). The two columns are equal when the ledger is sound; if not,\nthe difference is reported, never plugged.",
        "operationId": "reports.trial_balance",
        "parameters": [
          {
            "description": "Defaults to today.",
            "in": "query",
            "name": "as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Defaults to today.",
              "title": "As Of"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrialBalanceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the trial balance",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/reports/upcoming_bills": {
      "get": {
        "description": "The bills coming due in the next `days` days: what is still owed on\nthe bills the books hold, by due date, and the bills each vendor's rhythm\nsays are coming (monthly, quarterly or yearly), at their usual amount.\nOverdue bills and late expected ones come first. A bill well over its\nvendor's usual says by how much.",
        "operationId": "reports.upcoming_bills",
        "parameters": [
          {
            "description": "How many days ahead to look, today included.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 90,
              "description": "How many days ahead to look, today included.",
              "maximum": 366,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpcomingBillsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the bills coming due",
        "tags": [
          "reports"
        ]
      }
    },
    "/v1/revaluations": {
      "post": {
        "description": "Revalue every foreign balance at the closing rate: one `revaluation`\nentry, each account moved by its difference against FX gain or loss.\nNothing is posted when nothing has moved. Refused with `conflict` when a\ncurrency held has no rate on or before the day.",
        "operationId": "revaluations.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevaluationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevaluationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Revalue foreign balances",
        "tags": [
          "revaluations"
        ]
      }
    },
    "/v1/revaluations/preview": {
      "get": {
        "description": "Every foreign balance on a balance-sheet account at the rate in force\non the closing date, and the gain or loss revaluing would post. Writes\nnothing.",
        "operationId": "revaluations.preview",
        "parameters": [
          {
            "description": "The closing date.",
            "in": "query",
            "name": "as_of",
            "required": true,
            "schema": {
              "description": "The closing date.",
              "format": "date",
              "title": "As Of",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevaluationOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Preview a foreign currency revaluation",
        "tags": [
          "revaluations"
        ]
      }
    },
    "/v1/rules": {
      "get": {
        "description": "Every rule these books file by, newest first.",
        "operationId": "rules.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Only rules a person wrote, only learned ones, or only those written from an answer.",
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "manual",
                    "learned",
                    "answer"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only rules a person wrote, only learned ones, or only those written from an answer.",
              "title": "Origin"
            }
          },
          {
            "description": "Only the rule this question's answer wrote.",
            "in": "query",
            "name": "source_question_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `qst_`.",
                  "examples": [
                    "qst_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "qst"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the rule this question's answer wrote.",
              "title": "Source Question Id"
            }
          },
          {
            "description": "Only rules that are on, or only paused ones.",
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only rules that are on, or only paused ones.",
              "title": "Is Active"
            }
          },
          {
            "description": "Only rules that name this counterparty.",
            "in": "query",
            "name": "counterparty_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only rules that name this counterparty.",
              "title": "Counterparty Id"
            }
          },
          {
            "description": "Only rules that file to this GL account.",
            "in": "query",
            "name": "category_account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only rules that file to this GL account.",
              "title": "Category Account Id"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the categorization rules",
        "tags": [
          "rules"
        ]
      },
      "post": {
        "description": "Write a rule. The category is validated now, not when it first fires.\n\nA rule matching exactly what another already matches is refused with\n`rule_conflict`; edit that one instead.",
        "operationId": "rules.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewRule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Write a categorization rule",
        "tags": [
          "rules"
        ]
      }
    },
    "/v1/rules/model_quality": {
      "get": {
        "description": "Of the model's proposals a person has since filed themselves, how\nmany they filed where the model said. Null until one has been judged.",
        "operationId": "rules.model_quality",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelQualityOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get how often people agreed with the model",
        "tags": [
          "rules"
        ]
      }
    },
    "/v1/rules/preview": {
      "get": {
        "description": "What a rule with these terms would match, before it is saved.\n\nLooks through the newest transactions with the same matching the feed\nuses and answers with how many match and the newest of them. Nothing is\nwritten and nothing is filed: a saved rule files what arrives after it,\nand what is already filed stays where it is. Terms that could never match\nare refused as saving them would be (`rule_invalid`).",
        "operationId": "rules.preview",
        "parameters": [
          {
            "description": "What the rule would look for.",
            "in": "query",
            "name": "pattern",
            "required": true,
            "schema": {
              "description": "What the rule would look for.",
              "maxLength": 200,
              "minLength": 1,
              "title": "Pattern",
              "type": "string"
            }
          },
          {
            "description": "Which text it is compared to.",
            "in": "query",
            "name": "match_on",
            "required": false,
            "schema": {
              "default": "description",
              "description": "Which text it is compared to.",
              "enum": [
                "description",
                "source_description",
                "counterparty"
              ],
              "title": "Match On",
              "type": "string"
            }
          },
          {
            "description": "How it is compared.",
            "in": "query",
            "name": "match_type",
            "required": false,
            "schema": {
              "default": "contains",
              "description": "How it is compared.",
              "enum": [
                "contains",
                "equals",
                "starts_with"
              ],
              "title": "Match Type",
              "type": "string"
            }
          },
          {
            "description": "Only transactions on this bank or card account.",
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions on this bank or card account.",
              "title": "Account Id"
            }
          },
          {
            "description": "Only transactions of this event type.",
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "expense",
                    "income",
                    "transfer",
                    "fee",
                    "interest",
                    "refund",
                    "sales_refund"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions of this event type.",
              "title": "Event Type"
            }
          },
          {
            "description": "Only transactions at least this size.",
            "in": "query",
            "name": "amount_min",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions at least this size.",
              "title": "Amount Min"
            }
          },
          {
            "description": "Only transactions at most this size.",
            "in": "query",
            "name": "amount_max",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions at most this size.",
              "title": "Amount Max"
            }
          },
          {
            "description": "Only transactions whose memo \u2014 the description the ledger shows, or the line the bank printed \u2014 holds these words. Compared as `pattern` is: case-insensitively, processor noise removed. Null when the rule does not look at the memo.",
            "in": "query",
            "name": "memo_pattern",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions whose memo \u2014 the description the ledger shows, or the line the bank printed \u2014 holds these words. Compared as `pattern` is: case-insensitively, processor noise removed. Null when the rule does not look at the memo.",
              "title": "Memo Pattern"
            }
          },
          {
            "description": "Only transactions with this paper behind them: an `invoice` or a `receipt` linked as evidence, or `none` for one with no paper at all. Null when the rule does not care.",
            "in": "query",
            "name": "document_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "invoice",
                    "receipt",
                    "none"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions with this paper behind them: an `invoice` or a `receipt` linked as evidence, or `none` for one with no paper at all. Null when the rule does not care.",
              "title": "Document Kind"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulePreviewOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "See what a rule would match before saving it",
        "tags": [
          "rules"
        ]
      }
    },
    "/v1/rules/run": {
      "post": {
        "description": "Decide what every undecided transaction is for: rules, then a model.\n\nCategorizes; does not post. Posting stays a separate decision, so a run\nthat produces something surprising can be looked at first.\n\nA run that may call the model counts against the entity's model budget\n(``MODEL_RUNS``); a rules-only run spends nothing and is not counted.",
        "operationId": "rules.run",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategorizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategorizeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "File undecided transactions by rule, then by model",
        "tags": [
          "rules"
        ]
      }
    },
    "/v1/rules/{rule_id}": {
      "delete": {
        "description": "Remove a rule. Transactions it already filed are untouched \u2014 they are in\nthe books, and changing a rule is not a reason to restate them. Pausing it\n(`is_active: false`) keeps it on the record instead.",
        "operationId": "rules.delete",
        "parameters": [
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rule_`.",
              "examples": [
                "rule_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rule Id",
              "type": "string",
              "x-id-prefix": "rule"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a rule",
        "tags": [
          "rules"
        ]
      },
      "get": {
        "description": "One rule, with how often it has fired.",
        "operationId": "rules.get",
        "parameters": [
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rule_`.",
              "examples": [
                "rule_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rule Id",
              "type": "string",
              "x-id-prefix": "rule"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a rule",
        "tags": [
          "rules"
        ]
      },
      "patch": {
        "description": "Change a rule, or pause it with `is_active: false`.\n\nHeld to the same checks as writing one. Transactions it already filed stay\nas they are: they are in the books, and changing a rule is not a reason to\nrestate them.",
        "operationId": "rules.update",
        "parameters": [
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rule_`.",
              "examples": [
                "rule_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rule Id",
              "type": "string",
              "x-id-prefix": "rule"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change or pause a rule",
        "tags": [
          "rules"
        ]
      }
    },
    "/v1/rules/{rule_id}/unnamed": {
      "get": {
        "description": "How many transactions a rule already filed do not name its department,\nor any other dimension value it names.\n\nA rule that names a department, or learns one, gives it to what it files\nfrom then on; what it filed before stays unnamed until it is given the\nvalues. A transaction naming another value of the dimension is not\ncounted: a person chose it.",
        "operationId": "rules.unnamed",
        "parameters": [
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rule_`.",
              "examples": [
                "rule_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rule Id",
              "type": "string",
              "x-id-prefix": "rule"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleUnnamedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Count what a rule filed that names no department yet",
        "tags": [
          "rules"
        ]
      }
    },
    "/v1/rules/{rule_id}/unnamed/name": {
      "post": {
        "description": "Give the transactions a rule already filed the department, and any\nother dimension value, it names.\n\nEach takes the rule's value for every dimension it does not name yet, as\nfiling it today would; a value a person chose stands. One already in the\nbooks is reversed and posted again with them, so the change is on the\nrecord and spend by department counts it. Ones in a locked month, and\nones spread over months, are left as they are. A batch a request,\noldest first; `unnamed.to_name` says how many are still to name.",
        "operationId": "rules.name_unnamed",
        "parameters": [
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `rule_`.",
              "examples": [
                "rule_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Rule Id",
              "type": "string",
              "x-id-prefix": "rule"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleNamedOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Give what a rule already filed its department",
        "tags": [
          "rules"
        ]
      }
    },
    "/v1/sbc_expense_runs": {
      "get": {
        "description": "Each month's stock-based compensation as its close posted it, the\nnewest first, split by department.",
        "operationId": "sbc_expense_runs.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SbcExpenseRunPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List stock-based compensation by month",
        "tags": [
          "sbc_expense_runs"
        ]
      }
    },
    "/v1/schedules": {
      "get": {
        "description": "Schedules in these books, the newest first: payments spread over the\nmonths they pay for, revenue earned over the months it covers, and\ndepreciation.",
        "operationId": "schedules.list",
        "parameters": [
          {
            "description": "Only schedules of this kind.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "revenue",
                    "prepaid",
                    "depreciation",
                    "accrual"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only schedules of this kind.",
              "title": "Kind"
            }
          },
          {
            "description": "Only schedules in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "active",
                    "complete",
                    "cancelled"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only schedules in this state.",
              "title": "Status"
            }
          },
          {
            "description": "Only the schedule spreading this transaction.",
            "in": "query",
            "name": "transaction_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `txn_`.",
                  "examples": [
                    "txn_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "txn"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the schedule spreading this transaction.",
              "title": "Transaction Id"
            }
          },
          {
            "description": "`true`: only paused schedules. `false`: only ones not paused.",
            "in": "query",
            "name": "paused",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`true`: only paused schedules. `false`: only ones not paused.",
              "title": "Paused"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchedulePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List schedules",
        "tags": [
          "schedules"
        ]
      },
      "post": {
        "description": "Spread a transaction over the months it pays for.\n\nMoney out (a year of software, an insurance premium) is used month by\nmonth; money in (an annual contract paid by wire) is earned month by month.\nThe transaction stays filed where it is. Nothing posts now: each close\nkeeps the part not yet used or earned in prepaid expenses or deferred\nrevenue, and lets it into the P&L month by month. A month already closed\nis caught up at the next close.\n\nRefused with `not_spreadable` for a transaction not in the books, split\nacross accounts, or not an expense or income; with `already_spread` when\nit has a schedule.",
        "operationId": "schedules.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpreadIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Spread a transaction over the months it pays for",
        "tags": [
          "schedules"
        ]
      }
    },
    "/v1/schedules/accruals": {
      "post": {
        "description": "Accrue a cost in the month it was used, before it is paid: September's\nAWS, charged in October, or a contractor who invoices after the month.\n\nThe close of that month debits the expense and credits accrued\nliabilities with the estimate. The close of the month the cost reaches\nthe books takes the estimate back out, beside the charge, so that month\ncarries only the difference. With a counterparty, the close finds the\ncharge itself: the first expense from them filed to the same account\nafter the month. Without one, release it when the bill is paid.\n\nName the department the cost belongs to in `dimensions`: the cost and\nits release both carry it.\nRefused with `not_accruable` for an account that is not an open expense,\na month already closed, or books with no accrued liabilities account;\nwith `dimension_required` when the account requires a department and\nnone is named.",
        "operationId": "schedules.accrue",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccrueIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Accrue a cost in the month it was used",
        "tags": [
          "schedules"
        ]
      }
    },
    "/v1/schedules/{schedule_id}": {
      "delete": {
        "description": "Delete a schedule no close has posted from: the transaction it spread\ncounts in full in its own month again. Refused with `schedule_in_use` once\na close has posted from it; shorten it instead.",
        "operationId": "schedules.delete",
        "parameters": [
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `sched_`.",
              "examples": [
                "sched_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Schedule Id",
              "type": "string",
              "x-id-prefix": "sched"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a schedule no close has used",
        "tags": [
          "schedules"
        ]
      },
      "get": {
        "description": "A schedule with every month it covers: what reaches the P&L in each,\nand the close entry that took it in.",
        "operationId": "schedules.get",
        "parameters": [
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `sched_`.",
              "examples": [
                "sched_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Schedule Id",
              "type": "string",
              "x-id-prefix": "sched"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a schedule month by month",
        "tags": [
          "schedules"
        ]
      },
      "patch": {
        "description": "Change what a schedule is for, the months it covers, or how it shares\nthem, an accrual's estimate, or the department its close entries carry.\nWhat the closes already posted stays; the next close posts the\ndifference. Refused with `schedule_not_editable` for one a provider\nkeeps, and with `accrual_released` for an accrual released. Its\ndepartment changes until a close has posted from it (`schedule_in_use`\nafter).",
        "operationId": "schedules.update",
        "parameters": [
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `sched_`.",
              "examples": [
                "sched_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Schedule Id",
              "type": "string",
              "x-id-prefix": "sched"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a schedule's months, description or estimate",
        "tags": [
          "schedules"
        ]
      }
    },
    "/v1/schedules/{schedule_id}/pause": {
      "post": {
        "description": "Pause a schedule: no close posts from it until it is resumed, and what\nit has already moved stays in the books. Pausing one already paused\nchanges nothing. Refused with `schedule_not_editable` for one a provider\nkeeps, and with `schedule_not_running` for one that finished or was\ncancelled.",
        "operationId": "schedules.pause",
        "parameters": [
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `sched_`.",
              "examples": [
                "sched_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Schedule Id",
              "type": "string",
              "x-id-prefix": "sched"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Pause a schedule so no close posts from it",
        "tags": [
          "schedules"
        ]
      }
    },
    "/v1/schedules/{schedule_id}/release": {
      "post": {
        "description": "Say an accrual's cost is in the books: name the charge that paid it,\nor, with none, the day it stopped being owed. The close of that month\ntakes the estimate back out. Refused with `not_accruable` for a schedule\nthat is not an accrual or a charge that is not its cost, and with\n`accrual_released` for one already released.",
        "operationId": "schedules.release",
        "parameters": [
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `sched_`.",
              "examples": [
                "sched_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Schedule Id",
              "type": "string",
              "x-id-prefix": "sched"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Release an accrual once its cost is in the books",
        "tags": [
          "schedules"
        ]
      }
    },
    "/v1/schedules/{schedule_id}/resume": {
      "post": {
        "description": "Resume a paused schedule. Its months stay as they were, so the next\nclose catches up every month it was paused; to push them later instead,\nchange its months. Resuming one that runs changes nothing.",
        "operationId": "schedules.resume",
        "parameters": [
          {
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `sched_`.",
              "examples": [
                "sched_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Schedule Id",
              "type": "string",
              "x-id-prefix": "sched"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Resume a paused schedule",
        "tags": [
          "schedules"
        ]
      }
    },
    "/v1/search": {
      "get": {
        "description": "Find GL accounts, counterparties, transactions, journal entries and\nrules by name, description, code or number.\n\nEach kind answers with at most `limit` matches: accounts by code,\ncounterparties by name, transactions and journal entries newest first.\nTo page through every match of one kind, list that kind with its own\nsearch filter instead.",
        "operationId": "search.query",
        "parameters": [
          {
            "description": "What to look for: part of a name or description, a GL account's code, or a journal entry's number. Case is ignored.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "description": "What to look for: part of a name or description, a GL account's code, or a journal entry's number. Case is ignored.",
              "maxLength": 200,
              "minLength": 1,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "description": "Only these kinds. Repeat the parameter for several; omit it for all.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "enum": [
                      "account",
                      "counterparty",
                      "transaction",
                      "journal_entry",
                      "rule"
                    ],
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only these kinds. Repeat the parameter for several; omit it for all.",
              "title": "Kind"
            }
          },
          {
            "description": "How many matches of each kind, at most.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 5,
              "description": "How many matches of each kind, at most.",
              "maximum": 20,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Find records by name, description, code or number",
        "tags": [
          "search"
        ]
      }
    },
    "/v1/tax_lines": {
      "get": {
        "description": "Every line of Form 1120, Schedule L and Schedule M-1 an account can\nreport on, in the form's order.",
        "operationId": "tax_lines.list",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxLineList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the tax lines an account can report on",
        "tags": [
          "tax_lines"
        ]
      }
    },
    "/v1/tax_lines/accounts": {
      "get": {
        "description": "Every postable account with the line it reports on, and whether a\nperson chose it or it is the default.",
        "operationId": "tax_lines.list_accounts",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountTaxLineList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List each account's tax line",
        "tags": [
          "tax_lines"
        ]
      }
    },
    "/v1/transactions": {
      "get": {
        "description": "Transactions from every bank, card, processor and statement, newest\nfirst, with what each was filed to or matched with. Filter by status for\nthe review queue, or by `kind` for the transfers.",
        "operationId": "transactions.list",
        "parameters": [
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "description": "Any of needs_review, ready, posted, excluded. Repeat it to match several: the review queue is `status=needs_review&status=ready`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any of needs_review, ready, posted, excluded. Repeat it to match several: the review queue is `status=needs_review&status=ready`.",
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Id"
            }
          },
          {
            "description": "Only transactions naming this counterparty.",
            "in": "query",
            "name": "counterparty_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions naming this counterparty.",
              "title": "Counterparty Id"
            }
          },
          {
            "description": "Only transactions filed to this account.",
            "in": "query",
            "name": "category_account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `gla_`.",
                  "examples": [
                    "gla_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "gla"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions filed to this account.",
              "title": "Category Account Id"
            }
          },
          {
            "description": "Only transactions whose filing a rule decided and still stands: what the rule filed. One a person has since filed again is not among them.",
            "in": "query",
            "name": "rule_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `rule_`.",
                  "examples": [
                    "rule_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "rule"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions whose filing a rule decided and still stands: what the rule filed. One a person has since filed again is not among them.",
              "title": "Rule Id"
            }
          },
          {
            "description": "Only transactions whose description contains this, ignoring case.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only transactions whose description contains this, ignoring case.",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "description": "`transfer`: only transfers between the books' own accounts, each movement once (the excluded other half of a matched pair is left out).",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "const": "transfer",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`transfer`: only transfers between the books' own accounts, each movement once (the excluded other half of a matched pair is left out).",
              "title": "Kind"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List transactions",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/categorize": {
      "post": {
        "description": "File several transactions under one account, as a person, in one\nrequest.\n\nEach is filed exactly as `transactions.categorize` files one, and judged\non its own: one that cannot be filed there (the wrong side of the income\nstatement, a closed month, a matched twin, not in these books) is left as\nit was and named in `refused` with the code it would have had alone,\nwhile the rest are filed. The whole request shares one request id on the\naudit trail.",
        "operationId": "transactions.categorize_many",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategorizeMany"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategorizeManyOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "File several transactions under one GL account",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}": {
      "get": {
        "description": "One transaction, with the raw row its source sent and every record the\nsource keeps about it (a card program's expense: approval, category,\nspender, original currency, a link), each with its past readings. What to\nlook at when a figure seems wrong.",
        "operationId": "transactions.get",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a transaction with its raw source data",
        "tags": [
          "transactions"
        ]
      },
      "patch": {
        "description": "Correct a transaction: rename it, move its date or keep a note with it.\n\nWhat the source sent is kept as it was (`source_description` and the raw\ndata); this changes what these books call it. A rename or a note changes\nnothing in the books: an entry already posted keeps the words it was\nposted with, and a note is the memo of the entry it posts next. A new\ndate on a transaction in the books posts it again on that day, by\nreversing its entry in the old month, so the correction is on the\nrecord. Refused, with the books left as they were: `period_closed` while\neither month is closed, `transaction_spread` for one a schedule spreads,\n`transaction_settles` for one that pays invoices or bills,\n`transaction_reconciled` for one matched to a bank statement, and\n`transaction_not_reposted` when it would not post on the new day.",
        "operationId": "transactions.update",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Rename a transaction, move its date or keep a note with it",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/capital_options": {
      "get": {
        "description": "What a transaction may be as money between the company and those who\nfund it, best first (decision 0191): a financing instrument's or an\nintercompany transaction's entry already in the books for its amount,\nthe expected way, within a week (`financing`, `intercompany`); a draft\ninstrument it would issue (`financing_draft`); intercompany with another\ncompany of the organization you can post in (`new_intercompany`); and\neach purpose the company's owners have (`capital`): for a corporation a\nloan from a shareholder, a stock purchase or a capital contribution\ncoming in, and a loan repaid or a dividend going out. Each carries a\ndeterministic score and its reasons: the instrument's investor named, a\nfounder or investor the books know, the payee filed for it before, the\nshareholder loan outstanding. Nothing is filed until one is chosen.",
        "operationId": "transactions.list_capital_options",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapitalOptionList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what a transaction could be as owner or financing money",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/capitalize": {
      "post": {
        "description": "Capitalize a purchase: file the transaction to an asset account and\nput the equipment it bought in the fixed asset register, in one step.\n\nBuying a laptop is not an expense; it swaps cash for an asset, which the\ncloses then depreciate (decision 0180). The transaction is filed to the\nasset account (1600 Computer equipment unless another is named) and\nposted; the asset costs what the transaction moved and names it\n(`fixed_asset_id`), and its depreciation carries the department named, or\nthe transaction's own. A transaction already in the books is re-filed by\nreversing its entry, as filing does.\n\nRefused with `account_not_usable` for anything but money spent or an\naccount that is not an asset, `fixed_asset_terms` for terms the register\nrefuses, a charge in another currency than the books' or one that cannot\npost yet (a card hold), and `transaction_capitalized` for one already\ncapitalized.",
        "operationId": "transactions.capitalize",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Capitalize"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Capitalize a purchase as a fixed asset",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/cash_link": {
      "post": {
        "description": "Say a transaction is the bank's side of a financing instrument or an\nintercompany amount, so its cash is in the books once (decision 0191).\n\nName the entry that already holds its cash, a draft instrument to issue\nfrom it, or another company of the organization to record it as\nintercompany with (both sets of books are posted, and the other side's\nbank transaction is linked too when exactly one fits; otherwise the\nother side's cash waits in its Cash in transit). When the entry moved\nthe transaction's own account the transaction is excluded as its\nevidence; when it moved another (Cash in transit, or a cash account the\nbank does not feed) the transaction is posted as a transfer from that\naccount. A transaction already filed is taken apart by reversal first.\nUndone by `transactions.unmatch`, which leaves the entry in the books.\n\nRefused with `cash_link_not_possible` when the transaction is not plain\nmoney in or out, a hold or matched; the entry is another amount, the\nother way or more than a week away, or already has its transaction; the\ndraft is not this deposit's; or the other company is not one you can\npost in, or keeps another currency. `period_closed` when a month that\nwould change is closed.",
        "operationId": "transactions.link_cash",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkCash"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Link a transaction to the financing or intercompany entry that holds its cash",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/categorizations": {
      "get": {
        "description": "Every decision about what a transaction is, newest first: which\naccount, by whom (a default, a rule, the model, a person), how sure, and\nwhy. The first is the one standing.",
        "operationId": "transactions.list_categorizations",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategorizationPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List every decision about what a transaction is",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/categorize": {
      "post": {
        "description": "File a transaction under an account, as a person.\n\nRefused with `account_not_usable` if the account is on the wrong side of the\nincome statement \u2014 see `app/finance/sides.py` for why that is not negotiable.\n\nA transaction already in the books is re-filed by reversing its entry and\nposting it again under the new account, so the correction is on the record.\nThat is refused with `period_closed` while its month is closed.",
        "operationId": "transactions.categorize",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Categorize"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "File a transaction to an account",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/counterparty": {
      "post": {
        "description": "Say who a transaction is with, or that nobody is named.\n\nIt changes who the transaction is attributed to and nothing in the books:\nthe GL account it is filed to stays. The one case that is refused is a\nposted transaction whose entry carries its counterparty on a receivable,\npayable or clearing line (`counterparty_on_control_line`); file it again\nto change that, so the correction is an entry of its own.",
        "operationId": "transactions.set_counterparty",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCounterparty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Say who a transaction is with",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/dimensions": {
      "post": {
        "description": "Say which department, and which value of any other dimension, a\ntransaction is for.\n\nThe values go on the lines it posts to the accounts it is filed to, so\nspend by department and the P&L by function count it where it belongs,\nand a schedule spreading it takes each month's share out with them. A\ntransaction already in the books is posted again with them, by reversing\nits entry, so the change is on the record; that is refused with\n`period_closed` while its month is closed. A spread transaction keeps its\nvalues (`transaction_spread`): delete its schedule first.",
        "operationId": "transactions.set_dimensions",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDimensions"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Say which department a transaction is for",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/exclude": {
      "post": {
        "description": "Keep a transaction out of the books, on the record.\n\nOnly possible before it posts. An excluded transaction that is already in\nthe books has to be reversed instead, because removing it would edit history.",
        "operationId": "transactions.exclude",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Exclude"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Exclude a transaction from the books",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/match": {
      "post": {
        "description": "Say two transactions are the two halves of one transfer between these\nbooks' own accounts, as a person.\n\nFor what the automatic matcher leaves alone on purpose: two candidates\nfor one row, or halves dated further apart than it looks. The outgoing\nhalf posts once as a transfer; the incoming half is kept out of the books\nas its evidence, pointing at it. The transfer is in the books at once, so\na wrong match is corrected the way any posted entry is: by reversing its\njournal entry, or by `transactions.unmatch`, which reverses it.\n\nThe transaction named in the path may already be a transfer, half of\nanother match, or posted under an account: that is taken apart by\nreversal first (decision 0189). Refused with `match_not_possible` when\nthe two are not a pair the books can post: the other is already matched,\nposted, excluded or a hold; either is a hold; they are on the same\naccount or move the same way; or the amounts differ.",
        "operationId": "transactions.match",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Match"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Match two transactions as one transfer",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/match_candidates": {
      "get": {
        "description": "What a transaction could be matched to by hand: the same amount to\nthe cent on another of these books' accounts, moving the other way, not\nyet in the books and not matched to anything. Unlike the automatic\nmatcher, no limit on how far apart the two are dated. A transaction that\nis already a transfer, half of one, or posted under an account is read\nas the row it becomes once `transactions.match` takes it apart.",
        "operationId": "transactions.list_match_candidates",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchCandidatesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what a transaction could be matched to as a transfer",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/owner_money": {
      "post": {
        "description": "File a transaction as money between the company and its owners, and\npost it (decision 0191).\n\nNot income and not a transfer: a founder's wire with no shares issued\nand no note is, for a corporation, a loan from a shareholder until a\ndocument says otherwise. Each purpose files to one account, opened the\nfirst time it is needed; which purposes there are follows the company's\nlegal structure (`transactions.list_capital_options`). A transaction\nalready in the books is filed again by reversal, as filing does; the\nfiling is taken back by `transactions.reopen` or by filing it elsewhere.\nA SAFE, note or venture debt is not filed here: its cash is linked to its\ninstrument (`transactions.link_cash`).\n\nRefused with `account_not_usable` for a purpose these owners do not\nhave or money moving the other way, a fee, interest, refund or hold;\n`chart_conflict` when the account's code is used for something else;\n`period_closed` when it is in the books in a closed month.",
        "operationId": "transactions.file_as_owner_money",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OwnerMoney"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "File a transaction as money between the company and its owners",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/receipts": {
      "get": {
        "description": "A transaction's receipts, each checked against it; while it has none,\nthe unclaimed receipts that might be its; and the address a receipt is\nforwarded to.",
        "operationId": "transactions.receipts",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionReceiptsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a transaction's receipts, checked, with the ones that might be its",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/reopen": {
      "post": {
        "description": "Send a filed transaction back to review: the way to take a filing back.\n\nA transaction in the books comes out of them by reversal, so the\ncorrection is on the record; that is refused with `period_closed` while\nits month is closed. A person's filing is taken back and the suggestion\nthat stood before it \u2014 a rule's, the model's or the suspense default \u2014\nis restored with its confidence, so the queue reads as it did before the\ndecision. A rule's or the model's own filing keeps its account and waits\nfor a person. Refused with `event_not_reopenable` for an excluded\ntransaction or one nobody has decided; a card hold a person filed, still\nwaiting for its charge, can be sent back. With `post`, a rule's or a\ngate-clearing model's decision that is restored is posted again as\ntheirs: the undo of a person's re-filing. To file it again,\n`transactions.categorize`.\n\nA transfer goes back as the plain income or expense row it was, out of\nthe books by reversal (decision 0189); either half of a transfer match\ntakes its partner back to review with it, as `transactions.unmatch` does.",
        "operationId": "transactions.reopen",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Reopen"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send a transaction back to review",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/settle": {
      "post": {
        "description": "Say a bank or card transaction pays open invoices or bills.\n\nMoney in pays a customer's issued invoices, money out a vendor's\napproved bills. The transaction is filed under the receivable or the\npayable, naming the party, and posted as itself on its own day, so the\ninvoices read paid and the sale is counted once. A transaction already\nin the books is reversed and posted again, refused with `period_closed`\nwhile its month is closed. Refused with `settlement_not_possible` for a\ntransaction that pays nothing (a transfer, a fee, a refund, a hold, a\nmatched or kept-out row) or already pays something, and with\n`settlement_invalid` when the documents are not one party's open ones or\ncome to more than the transaction or a document has left.\n\nTo undo it, send the transaction back to review\n(`transactions.reopen`): what it paid is owed again.",
        "operationId": "transactions.settle",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settle"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Say a transaction pays open invoices or bills",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/settlement": {
      "get": {
        "description": "What a bank or card transaction pays among the open invoices (money\nin) or bills (money out), or could: the documents whose number its\ndescription names; else, when it names its party, that party's one\ndocument for exactly the amount or all of its open documents when they\nadd up to it; else every document for exactly the amount. A transaction\nwhose description names exactly one of them and that pays exactly what is\nleft on it is settled by LedgerIt at sync.",
        "operationId": "transactions.get_settlement",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "See which invoices or bills a transaction pays, or could",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/split": {
      "post": {
        "description": "File one transaction across several GL accounts, as a person: a\npayroll run that is wages, taxes and benefits; a payout that is revenue\nless fees.\n\nRefused with `splits_unbalanced` unless the parts add up to the\ntransaction's amount exactly, and with `account_not_usable` for a part on\nthe wrong side of the income statement. Sending a new split replaces the\none that stands. To undo a split, file the transaction under one account\n(`transactions.categorize`).\n\nA transaction already in the books is split by reversing its entry and\nposting it again, so the correction is on the record. That is refused\nwith `period_closed` while its month is closed.",
        "operationId": "transactions.split",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Split"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "File a transaction across several GL accounts",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/suggestions": {
      "get": {
        "description": "The accounts a transaction probably belongs in, best first: what\npeople proposed for it in comments still open, then the default account\nof its counterparty when one is set, then where a person or a rule\nfiled the same payee before, most often first, then the\naccount the model proposed for it, with its confidence and reasoning.\nOnly income and expense accounts open for filing are suggested, never\nsuspense. Nothing is filed until one is chosen through\n`transactions.categorize`.\n\n`transfers` names the transfers between the books' own accounts it\nprobably is: a row that could be its other half (`match`, ranked when\nthere are several, which the automatic matcher leaves alone), an own\naccount money moved to or from before (`transfer_account`), and, for a\nrow naming the company itself or that the model read as a transfer,\nCash in transit (`in_transit`). Each has a deterministic score and its\nreasons; one the model read carries its words (`model_reasoning`).",
        "operationId": "transactions.list_suggestions",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSuggestionList"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the accounts a transaction probably belongs in",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/transfer": {
      "post": {
        "description": "File a transaction as a transfer between the books' own accounts when\nits other half is not in LedgerIt: money from or to an account that is not\nconnected.\n\nNothing was earned or spent, so it files under no income or expense\naccount. It posts at once between its own account and the account named,\nthe way the money moved: an arrival debits its own account. A transfer\nwhose other half IS in LedgerIt is matched to it instead\n(`transactions.match`).\n\nA transaction already in the books is filed again by reversal (decision\n0189): one posted under an account, or a transfer to change its other\naccount. Either half of a match is taken apart first, its partner back to\nreview.\n\nRefused with `transfer_not_possible` when the transaction is excluded or\na hold, is a fee, interest or a refund, or the account named is not one\nof these books' own cash, card or other asset or liability accounts in\nits currency; with `period_closed` when it is in the books in a closed\nmonth.",
        "operationId": "transactions.file_as_transfer",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileAsTransfer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "File a transaction as a transfer from an account that is not connected",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/transactions/{event_id}/unmatch": {
      "post": {
        "description": "Undo a transfer, duplicate or refund match that is wrong, or a link\nto the financing or intercompany entry holding a transaction's cash.\n\nEach row involved goes back to needing review, and is not matched again\nautomatically. A transfer match already in the books is undone by\nreversal (decision 0189): the half that posted for the pair comes out of\nthe books by a reversing entry, refused with `period_closed` while its\nmonth is closed; a half that is a transfer on its own (filed against Cash\nin transit) keeps its entry. Refused with `match_not_undoable` for a\nduplicate or refund match once it is in the books, and for an\nauthorisation, which is one transaction with its settlement rather than\na judgement. A link is undone by reversing what the transaction posted\nfor it, if anything; the entry stays, and the transaction goes back to\nreview, never linked again on its own (decision 0191).",
        "operationId": "transactions.unmatch",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `txn_`.",
              "examples": [
                "txn_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Event Id",
              "type": "string",
              "x-id-prefix": "txn"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Unmatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Undo a transaction's match",
        "tags": [
          "transactions"
        ]
      }
    },
    "/v1/w9_requests": {
      "get": {
        "description": "The W-9s asked of vendors, the newest first, with what each came to.",
        "operationId": "w9_requests.list",
        "parameters": [
          {
            "description": "Only this vendor's requests.",
            "in": "query",
            "name": "counterparty_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "description": "An id that starts with `party_`.",
                  "examples": [
                    "party_01h455vb4pex5vsknk084sn02q"
                  ],
                  "type": "string",
                  "x-id-prefix": "party"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this vendor's requests.",
              "title": "Counterparty Id"
            }
          },
          {
            "description": "Only `open`, `completed` or `cancelled` requests.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "open",
                    "completed",
                    "cancelled"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `open`, `completed` or `cancelled` requests.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/W9RequestPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the W-9s asked of vendors",
        "tags": [
          "w9_requests"
        ]
      },
      "post": {
        "description": "Ask a vendor for their W-9. They are emailed a link to a form that\nworks for 30 days; completing it records their W-9 on the vendor, with\ntheir taxpayer identification number encrypted. Asking again cancels the\nopen request, and its link stops working. `emailed` says whether the\nemail went; when it did not, the request is open all the same and can be\nasked again.",
        "operationId": "w9_requests.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/W9RequestCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/W9RequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ask a vendor for their W-9",
        "tags": [
          "w9_requests"
        ]
      }
    },
    "/v1/w9_requests/{request_id}": {
      "get": {
        "description": "One W-9 request, and what the vendor certified if they have.",
        "operationId": "w9_requests.get",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `tin_req_`.",
              "examples": [
                "tin_req_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Request Id",
              "type": "string",
              "x-id-prefix": "tin_req"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/W9RequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a W-9 request and what the vendor certified",
        "tags": [
          "w9_requests"
        ]
      }
    },
    "/v1/w9_requests/{request_id}/cancel": {
      "post": {
        "description": "Stop an open request's link working. Completed and cancelled requests\nstay as they are.",
        "operationId": "w9_requests.cancel",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `tin_req_`.",
              "examples": [
                "tin_req_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Request Id",
              "type": "string",
              "x-id-prefix": "tin_req"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/W9RequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Cancel a W-9 request",
        "tags": [
          "w9_requests"
        ]
      }
    },
    "/v1/webhook_subscriptions": {
      "get": {
        "description": "The addresses these books send their events to, the newest first.",
        "operationId": "webhook_subscriptions.list",
        "parameters": [
          {
            "description": "Only those switched on (`true`) or off (`false`).",
            "in": "query",
            "name": "enabled",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only those switched on (`true`) or off (`false`).",
              "title": "Enabled"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the addresses the books send events to",
        "tags": [
          "webhook_subscriptions"
        ]
      },
      "post": {
        "description": "Send these books' events to an https address. Every event from now on\nthat it wants is POSTed to it, signed with its secret (read it with\n`GET /webhook_subscriptions/{id}/secret`), and retried until the address\nanswers 2xx.",
        "operationId": "webhook_subscriptions.create",
        "parameters": [
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send the books' events to an address",
        "tags": [
          "webhook_subscriptions"
        ]
      }
    },
    "/v1/webhook_subscriptions/{subscription_id}": {
      "delete": {
        "description": "Stop sending events to an address, for good. Its deliveries still\nwaiting go with it.",
        "operationId": "webhook_subscriptions.delete",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `whsub_`.",
              "examples": [
                "whsub_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Subscription Id",
              "type": "string",
              "x-id-prefix": "whsub"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a webhook subscription",
        "tags": [
          "webhook_subscriptions"
        ]
      },
      "get": {
        "description": "One webhook subscription.",
        "operationId": "webhook_subscriptions.get",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `whsub_`.",
              "examples": [
                "whsub_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Subscription Id",
              "type": "string",
              "x-id-prefix": "whsub"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a webhook subscription",
        "tags": [
          "webhook_subscriptions"
        ]
      },
      "patch": {
        "description": "Change a subscription's address, description or events, or switch it\noff and on. Only the fields sent change.",
        "operationId": "webhook_subscriptions.update",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `whsub_`.",
              "examples": [
                "whsub_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Subscription Id",
              "type": "string",
              "x-id-prefix": "whsub"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a webhook subscription, or switch it off and on",
        "tags": [
          "webhook_subscriptions"
        ]
      }
    },
    "/v1/webhook_subscriptions/{subscription_id}/deliveries": {
      "get": {
        "description": "What has been sent to a subscription, and what is waiting, the newest\nfirst: each event, how many tries, and why the last one failed.",
        "operationId": "webhook_subscriptions.list_deliveries",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `whsub_`.",
              "examples": [
                "whsub_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Subscription Id",
              "type": "string",
              "x-id-prefix": "whsub"
            }
          },
          {
            "description": "Only `pending` or `delivered` deliveries.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "pending",
                    "delivered"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only `pending` or `delivered` deliveries.",
              "title": "Status"
            }
          },
          {
            "description": "Page size, 1\u2013200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size, 1\u2013200.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The `next_cursor` of the previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The `next_cursor` of the previous page.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List what was sent to a subscription",
        "tags": [
          "webhook_subscriptions"
        ]
      }
    },
    "/v1/webhook_subscriptions/{subscription_id}/secret": {
      "get": {
        "description": "The secret a subscription's deliveries are signed with, to check the\n`LedgerIt-Signature` header against.",
        "operationId": "webhook_subscriptions.get_secret",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `whsub_`.",
              "examples": [
                "whsub_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Subscription Id",
              "type": "string",
              "x-id-prefix": "whsub"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecret"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the secret a subscription's deliveries are signed with",
        "tags": [
          "webhook_subscriptions"
        ]
      }
    },
    "/v1/webhook_subscriptions/{subscription_id}/test": {
      "post": {
        "description": "Send a `webhook.test` event to this subscription alone, to see its\naddress answer. It is queued like any delivery and listed with them.",
        "operationId": "webhook_subscriptions.test",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "description": "An id that starts with `whsub_`.",
              "examples": [
                "whsub_01h455vb4pex5vsknk084sn02q"
              ],
              "title": "Subscription Id",
              "type": "string",
              "x-id-prefix": "whsub"
            }
          },
          {
            "in": "header",
            "name": "accept-language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accept-Language"
            }
          },
          {
            "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Any unique string, such as a UUID. Retrying with the same key returns the first response instead of doing the work again. Keys are kept for 24 hours.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "X-Entity-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Entity-Id"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The request was malformed or a parameter is invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No valid credential was sent."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The credential or the member's role does not allow this."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such resource in this ledger."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A conflicting request, e.g. one with the same Idempotency-Key still running."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "A well-formed request a business rule refused."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Too many requests; retry after the Retry-After header."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Something failed on our side; the request_id identifies it."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send a test event to a subscription",
        "tags": [
          "webhook_subscriptions"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.ledgerit.ai"
    }
  ]
}
