{
  "openapi": "3.1.1",
  "info": {
    "title": "Eternify Ledger API: Accounting",
    "version": "v1",
    "x-wire-version": "2026-08-31",
    "description": "The chart of accounts, entities, journal entries, dimensions and payment terms. The same operations the Eternify Ledger app and its connected AI tools use, over HTTPS and JSON. Send a key or an access token as a bearer token. Each operation is stable or beta: a stable operation changes only with 365 days' notice, a beta one with 30. Changes are listed in the changelog at https://www.eternifylabs.com/resources/developers/changelog.",
    "contact": {
      "name": "Eternify Labs developer resources",
      "url": "https://www.eternifylabs.com/resources/developers"
    }
  },
  "servers": [
    {
      "url": "https://api.eternifylabs.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "oauth": []
    }
  ],
  "tags": [
    {
      "name": "accounting",
      "description": "The chart of accounts, entities, journal entries, dimensions and payment terms.",
      "x-display-name": "Accounting"
    }
  ],
  "paths": {
    "/v1/accounts": {
      "get": {
        "operationId": "listAccounts",
        "summary": "Lists the accounts of the chart in order, with the server's total.",
        "description": "Lists the accounts of the chart in order, with the server's total. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "activeForEntityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "inactiveForEntityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "excludeSubtreeOf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "maxDepth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "ASSET",
                              "LIABILITY",
                              "EQUITY",
                              "REVENUE",
                              "EXPENSE"
                            ]
                          },
                          "gifiCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "aspeLine": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "cashFlowRole": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "CASH",
                                  "OPERATING",
                                  "INVESTING",
                                  "FINANCING",
                                  "NON_CASH"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reconciliation": {
                            "type": "string",
                            "enum": [
                              "NONE",
                              "CLEARS_TO_ZERO",
                              "CERTIFIED"
                            ]
                          },
                          "parentId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "balanceMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "code",
                          "name",
                          "type",
                          "gifiCode",
                          "aspeLine",
                          "cashFlowRole",
                          "reconciliation",
                          "parentId",
                          "balanceMinor",
                          "currency"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "createAccount",
        "summary": "Creates an account in the chart of accounts.",
        "description": "Creates an account in the chart of accounts. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z.-]{1,20}$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "ASSET",
                      "LIABILITY",
                      "EQUITY",
                      "REVENUE",
                      "EXPENSE"
                    ]
                  },
                  "gifiCode": {
                    "type": "string"
                  },
                  "aspeLine": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "cashFlowRole": {
                    "type": "string",
                    "enum": [
                      "CASH",
                      "OPERATING",
                      "INVESTING",
                      "FINANCING",
                      "NON_CASH"
                    ]
                  },
                  "parentId": {
                    "type": "string"
                  }
                },
                "required": [
                  "entityId",
                  "code",
                  "name",
                  "type"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/accounts/activation": {
      "post": {
        "operationId": "setActivation",
        "summary": "Switches one account on or off for one company.",
        "description": "Switches one account on or off for one company. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "accountId",
                  "entityId",
                  "active"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/accounts/certifications/{certificationId}/withdraw": {
      "post": {
        "operationId": "withdrawAccountCertification",
        "summary": "Withdraws the certification of an account's balance.",
        "description": "Withdraws the certification of an account's balance. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "certificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAccountCertificationsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/accounts/dimension-policy": {
      "post": {
        "operationId": "setDimensionPolicy",
        "summary": "Sets which dimensions an account must carry on its postings.",
        "description": "Sets which dimensions an account must carry on its postings. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "dimensionTypeId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "policy": {
                    "type": "string",
                    "enum": [
                      "REQUIRED",
                      "OPTIONAL",
                      "FORBIDDEN"
                    ]
                  }
                },
                "required": [
                  "accountId",
                  "dimensionTypeId",
                  "policy"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/accounts/{accountId}": {
      "get": {
        "operationId": "getAccount",
        "summary": "Returns one account with its balance, its activation and its posting policy.",
        "description": "Returns one account with its balance, its activation and its posting policy. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "asOf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "ASSET",
                        "LIABILITY",
                        "EQUITY",
                        "REVENUE",
                        "EXPENSE"
                      ]
                    },
                    "gifiCode": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "aspeLine": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "cashFlowRole": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "CASH",
                            "OPERATING",
                            "INVESTING",
                            "FINANCING",
                            "NON_CASH"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reconciliation": {
                      "type": "string",
                      "enum": [
                        "NONE",
                        "CLEARS_TO_ZERO",
                        "CERTIFIED"
                      ]
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "balanceMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "ledgerId": {
                      "type": "string"
                    },
                    "dimensionPolicies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dimensionTypeId": {
                            "type": "string"
                          },
                          "dimensionTypeCode": {
                            "type": "string"
                          },
                          "dimensionTypeLabel": {
                            "type": "string"
                          },
                          "policy": {
                            "type": "string",
                            "enum": [
                              "REQUIRED",
                              "OPTIONAL",
                              "FORBIDDEN"
                            ]
                          }
                        },
                        "required": [
                          "dimensionTypeId",
                          "dimensionTypeCode",
                          "dimensionTypeLabel",
                          "policy"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "activations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "active": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "entityId",
                          "entityName",
                          "active"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "activity": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "lineId": {
                                "type": "string"
                              },
                              "entryId": {
                                "type": "string"
                              },
                              "entryRef": {
                                "type": "string"
                              },
                              "entryDate": {
                                "type": "string"
                              },
                              "entityName": {
                                "type": "string"
                              },
                              "memo": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "debitMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "creditMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "balanceMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "functionalDebitMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "functionalCreditMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "functionalCurrency": {
                                "type": "string"
                              },
                              "document": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "INVOICE",
                                          "CREDIT_NOTE",
                                          "RECEIPT"
                                        ]
                                      },
                                      "id": {
                                        "type": "string"
                                      },
                                      "number": {
                                        "type": "string"
                                      },
                                      "href": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "number",
                                      "href"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "lineId",
                              "entryId",
                              "entryRef",
                              "entryDate",
                              "entityName",
                              "memo",
                              "debitMinor",
                              "creditMinor",
                              "balanceMinor",
                              "currency",
                              "functionalDebitMinor",
                              "functionalCreditMinor",
                              "functionalCurrency"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "total": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "data",
                        "nextCursor",
                        "total"
                      ],
                      "additionalProperties": false
                    },
                    "openingBalanceMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "appliedScope": {
                      "type": "object",
                      "properties": {
                        "entityId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "entityName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "asOf": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "entityId",
                        "entityName",
                        "asOf"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "code",
                    "name",
                    "type",
                    "gifiCode",
                    "aspeLine",
                    "cashFlowRole",
                    "reconciliation",
                    "parentId",
                    "balanceMinor",
                    "currency",
                    "ledgerId",
                    "dimensionPolicies",
                    "activations",
                    "activity",
                    "openingBalanceMinor",
                    "appliedScope"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "patch": {
        "operationId": "updateAccount",
        "summary": "Changes an account's name, number or settings.",
        "description": "Changes an account's name, number or settings. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reconciliation": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "CLEARS_TO_ZERO",
                      "CERTIFIED"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z.-]{1,20}$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "gifiCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "aspeLine": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cashFlowRole": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "CASH",
                          "OPERATING",
                          "INVESTING",
                          "FINANCING",
                          "NON_CASH"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "changed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "changed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/accounts/{accountId}/audit": {
      "get": {
        "operationId": "listAccountAudit",
        "summary": "Lists the audit trail of one account.",
        "description": "Lists the audit trail of one account. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ALL",
                "NATIVE",
                "IMPORTED"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/accounts/{accountId}/certification-support": {
      "get": {
        "operationId": "accountCertificationSupport",
        "summary": "Returns the support a balance certification is given on.",
        "description": "Returns the support a balance certification is given on. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 2000,
              "maximum": 2100
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string"
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "entityName": {
                      "type": "string"
                    },
                    "periodYear": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "periodMonth": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "periodEnd": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "source": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYABLES_AGEING"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ledgerBalanceMinor": {
                      "type": "string"
                    },
                    "supportComputedMinor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "differenceMinor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "unavailable": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "detail": {
                              "type": "string"
                            },
                            "remedy": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "detail",
                            "remedy"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "entityTimeZone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "accountId",
                    "entityId",
                    "entityName",
                    "periodYear",
                    "periodMonth",
                    "periodEnd",
                    "source",
                    "ledgerBalanceMinor",
                    "supportComputedMinor",
                    "differenceMinor",
                    "unavailable",
                    "entityTimeZone"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/accounts/{accountId}/certifications": {
      "get": {
        "operationId": "listAccountCertifications",
        "summary": "Lists the certifications of an account's balance.",
        "description": "Lists the certifications of an account's balance. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "includeWithdrawn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListAccountCertificationsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "certifyAccount",
        "summary": "Certifies an account's balance as correct at a date.",
        "description": "Certifies an account's balance as correct at a date. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "periodYear": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100
                  },
                  "periodMonth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "supportSource": {
                    "default": "TYPED",
                    "type": "string",
                    "enum": [
                      "TYPED",
                      "SUBLEDGER"
                    ]
                  },
                  "supportBalanceMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "evidenceDocumentId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "entityId",
                  "periodYear",
                  "periodMonth"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAccountCertificationsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/assets": {
      "get": {
        "operationId": "listAssets",
        "summary": "Lists the fixed assets, with the server's total.",
        "description": "Lists the fixed assets, with the server's total. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "DISPOSED",
                "FULLY_DEPRECIATED"
              ]
            }
          },
          {
            "name": "ccaClass",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "3",
                "6",
                "8",
                "10",
                "12",
                "16",
                "43",
                "44",
                "46",
                "50",
                "53",
                "54",
                "55",
                "56",
                "10.1",
                "14.1",
                "43.1",
                "43.2"
              ]
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "BILL",
                "MANUAL"
              ]
            }
          },
          {
            "name": "assetAccountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "acquiredOn": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "inServiceOn": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "costMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "salvageMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "STRAIGHT_LINE",
                              "DECLINING_BALANCE"
                            ]
                          },
                          "usefulLifeMonths": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decliningRateE5": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ccaClass": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "1",
                                  "3",
                                  "6",
                                  "8",
                                  "10",
                                  "12",
                                  "16",
                                  "43",
                                  "44",
                                  "46",
                                  "50",
                                  "53",
                                  "54",
                                  "55",
                                  "56",
                                  "10.1",
                                  "14.1",
                                  "43.1",
                                  "43.2"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "$ref": "#/components/schemas/Source"
                          },
                          "isPassengerVehicle": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ACTIVE",
                              "DISPOSED",
                              "FULLY_DEPRECIATED"
                            ]
                          },
                          "disposedOn": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "disposalProceedsMinor": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "disposalEntryId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "disposalEntryStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "disposalBinds": {
                            "type": "boolean"
                          },
                          "accumulatedPostedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "netBookValueMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "pendingRows": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "assetAccount": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "code",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "accumulatedAccount": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "code",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "expenseAccount": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "code",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "minLength": 20
                          }
                        },
                        "required": [
                          "id",
                          "entityId",
                          "entityName",
                          "name",
                          "description",
                          "acquiredOn",
                          "inServiceOn",
                          "costMinor",
                          "salvageMinor",
                          "currency",
                          "method",
                          "usefulLifeMonths",
                          "decliningRateE5",
                          "ccaClass",
                          "source",
                          "isPassengerVehicle",
                          "status",
                          "disposedOn",
                          "disposalProceedsMinor",
                          "disposalEntryId",
                          "disposalEntryStatus",
                          "disposalBinds",
                          "accumulatedPostedMinor",
                          "netBookValueMinor",
                          "pendingRows",
                          "assetAccount",
                          "accumulatedAccount",
                          "expenseAccount",
                          "createdByName",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "registerAsset",
        "summary": "Registers a fixed asset.",
        "description": "Registers a fixed asset. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterAssetRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterAssetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/assets/{assetId}": {
      "get": {
        "operationId": "getAsset",
        "summary": "Returns one fixed asset with its depreciation.",
        "description": "Returns one fixed asset with its depreciation. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterAssetResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/assets/{assetId}/dispose": {
      "post": {
        "operationId": "disposeAsset",
        "summary": "Disposes of a fixed asset and posts the gain or loss.",
        "description": "Disposes of a fixed asset and posts the gain or loss. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "disposedOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "proceedsMajor": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "atArmsLength": {
                    "type": "boolean"
                  },
                  "cashAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "gainLossAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "memo": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "disposedOn",
                  "proceedsMajor",
                  "atArmsLength",
                  "cashAccountId",
                  "gainLossAccountId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterAssetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/budgets": {
      "get": {
        "operationId": "listBudgets",
        "summary": "Lists the budgets on the ledger.",
        "description": "Lists the budgets on the ledger. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "fiscalYear",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 2000,
              "maximum": 2100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "fiscalYear": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "fiscalYearEndMonth": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 12
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "approved": {
                            "type": "boolean"
                          },
                          "approvedByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "approvedAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdById": {
                            "type": "string"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "lineCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "totalMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "excludedLineCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "excludedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          }
                        },
                        "required": [
                          "id",
                          "entityId",
                          "entityName",
                          "name",
                          "fiscalYear",
                          "fiscalYearEndMonth",
                          "currency",
                          "version",
                          "approved",
                          "approvedByName",
                          "approvedAt",
                          "createdById",
                          "createdByName",
                          "createdAt",
                          "lineCount",
                          "totalMinor",
                          "excludedLineCount",
                          "excludedMinor"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "createBudget",
        "summary": "Creates a budget for a period with its lines.",
        "description": "Creates a budget for a period with its lines. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "fiscalYear": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "lines": {
                    "minItems": 1,
                    "maxItems": 2400,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "periodMonth": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 12
                        },
                        "amountMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        }
                      },
                      "required": [
                        "accountId",
                        "periodMonth",
                        "amountMinor"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "entityId",
                  "fiscalYear",
                  "name",
                  "lines"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateBudgetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/budgets/variance": {
      "get": {
        "operationId": "budgetVariance",
        "summary": "Returns the budget against actual for each budget line.",
        "description": "Returns the budget against actual for each budget line. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "fiscalYear",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 2000,
              "maximum": 2100
            }
          },
          {
            "name": "fromMonth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12
            }
          },
          {
            "name": "toMonth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entityId": {
                      "type": "string"
                    },
                    "entityName": {
                      "type": "string"
                    },
                    "fiscalYear": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "fromMonth": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "toMonth": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "window": {
                      "$ref": "#/components/schemas/Window"
                    },
                    "windowFiscalYearEndMonth": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 12
                    },
                    "entityFiscalYearEndMonth": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 12
                    },
                    "currency": {
                      "type": "string"
                    },
                    "budgetName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "budgetVersion": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "ASSET",
                              "LIABILITY",
                              "EQUITY",
                              "REVENUE",
                              "EXPENSE"
                            ]
                          },
                          "budgetMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "actualMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "varianceMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "favourable": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "varianceBp": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "committedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          }
                        },
                        "required": [
                          "accountId",
                          "code",
                          "name",
                          "type",
                          "budgetMinor",
                          "actualMinor",
                          "varianceMinor",
                          "favourable",
                          "varianceBp",
                          "committedMinor"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "budgetMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "actualMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "varianceMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "committedMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "unbudgetedCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "unspentCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "excludedBalanceSheetLines": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "entityId",
                    "entityName",
                    "fiscalYear",
                    "fromMonth",
                    "toMonth",
                    "window",
                    "windowFiscalYearEndMonth",
                    "entityFiscalYearEndMonth",
                    "currency",
                    "budgetName",
                    "budgetVersion",
                    "rows",
                    "budgetMinor",
                    "actualMinor",
                    "varianceMinor",
                    "committedMinor",
                    "unbudgetedCount",
                    "unspentCount",
                    "excludedBalanceSheetLines"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/budgets/{budgetId}/approve": {
      "post": {
        "operationId": "approveBudget",
        "summary": "Approves a budget so that it becomes the one measured against.",
        "description": "Approves a budget so that it becomes the one measured against. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "budgetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateBudgetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/chart-imports": {
      "get": {
        "operationId": "listChartImports",
        "summary": "Lists the chart of accounts imports and where each one stands.",
        "description": "Lists the chart of accounts imports and where each one stands. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "REVIEW",
                "APPROVED"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "fileName": {
                            "type": "string"
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "QBO",
                              "SAGE50",
                              "GENERIC"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "REVIEW",
                              "APPROVED"
                            ]
                          },
                          "rowCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "groupCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "skippedCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "uploadedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "approvedBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "approvedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "accountsCreated": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dimensionValuesCreated": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dimensionPoliciesCreated": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "entityId",
                          "entityName",
                          "fileName",
                          "format",
                          "status",
                          "rowCount",
                          "groupCount",
                          "skippedCount",
                          "uploadedBy",
                          "createdAt",
                          "approvedBy",
                          "approvedAt",
                          "accountsCreated",
                          "dimensionValuesCreated",
                          "dimensionPoliciesCreated"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "createChartImport",
        "summary": "Starts an import of a chart of accounts from an uploaded file.",
        "description": "Starts an import of a chart of accounts from an uploaded file. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "csv": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000000
                  }
                },
                "required": [
                  "entityId",
                  "fileName",
                  "csv"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateChartImportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/chart-imports/{importId}": {
      "get": {
        "operationId": "getChartImport",
        "summary": "Returns one chart of accounts import with its rows and findings.",
        "description": "Returns one chart of accounts import with its rows and findings. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateChartImportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/chart-imports/{importId}/approve": {
      "post": {
        "operationId": "approveChartImport",
        "summary": "Approves a chart of accounts import so its accounts are created.",
        "description": "Approves a chart of accounts import so its accounts are created. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "declinedGroups": {
                    "default": [],
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REVIEW",
                        "APPROVED"
                      ]
                    },
                    "accountsCreated": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "dimensionValuesCreated": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "dimensionPoliciesCreated": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "dimensionTypeCode": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "declinedGroups": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "accountsWithoutGifi": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "replayed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "accountsCreated",
                    "dimensionValuesCreated",
                    "dimensionPoliciesCreated",
                    "dimensionTypeCode",
                    "declinedGroups",
                    "accountsWithoutGifi",
                    "replayed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers": {
      "get": {
        "operationId": "listCutovers",
        "summary": "Lists the cutovers that move a company onto this ledger.",
        "description": "Lists the cutovers that move a company onto this ledger. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "OPEN",
                "SETTLED",
                "WITHDRAWN"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "entityTimeZone": {
                            "type": "string"
                          },
                          "conversionDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "previousSystem": {
                            "type": "string",
                            "enum": [
                              "QUICKBOOKS_ONLINE",
                              "QUICKBOOKS_DESKTOP",
                              "XERO",
                              "SAGE_50",
                              "SPREADSHEET",
                              "OTHER"
                            ]
                          },
                          "previousSystemLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "previousSystemName": {
                            "type": "string"
                          },
                          "suspenseAccount": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "code",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "SETTLED",
                              "WITHDRAWN"
                            ]
                          },
                          "openedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "openedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "settledBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "settledAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "entityId",
                          "entityName",
                          "entityTimeZone",
                          "conversionDate",
                          "previousSystem",
                          "previousSystemLabel",
                          "previousSystemName",
                          "suspenseAccount",
                          "state",
                          "openedBy",
                          "openedAt",
                          "settledBy",
                          "settledAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "openCutover",
        "summary": "Opens a cutover that moves a company's opening balances onto this ledger.",
        "description": "Opens a cutover that moves a company's opening balances onto this ledger. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "conversionDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "previousSystem": {
                    "type": "string",
                    "enum": [
                      "QUICKBOOKS_ONLINE",
                      "QUICKBOOKS_DESKTOP",
                      "XERO",
                      "SAGE_50",
                      "SPREADSHEET",
                      "OTHER"
                    ]
                  },
                  "previousSystemLabel": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "suspenseAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "itcClaimedInPreviousSystem": {
                    "default": true,
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "entityId",
                  "conversionDate",
                  "previousSystem",
                  "suspenseAccountId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCutoverResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers/{cutoverId}": {
      "get": {
        "operationId": "getCutover",
        "summary": "Returns one cutover with its steps and its status.",
        "description": "Returns one cutover with its steps and its status. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCutoverResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "patch": {
        "operationId": "updateCutover",
        "summary": "Changes the details of an open cutover.",
        "description": "Changes the details of an open cutover. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversionDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "previousSystem": {
                    "type": "string",
                    "enum": [
                      "QUICKBOOKS_ONLINE",
                      "QUICKBOOKS_DESKTOP",
                      "XERO",
                      "SAGE_50",
                      "SPREADSHEET",
                      "OTHER"
                    ]
                  },
                  "previousSystemLabel": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "suspenseAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "itcClaimedInPreviousSystem": {
                    "type": "boolean"
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openingEntryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCutoverResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers/{cutoverId}/brief": {
      "post": {
        "operationId": "draftCutoverBrief",
        "summary": "Drafts the brief that explains a cutover to the people who sign it off.",
        "description": "Drafts the brief that explains a cutover to the people who sign it off. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "checksDigest": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{16}$"
                  },
                  "checksReadAt": {
                    "type": "string",
                    "minLength": 20
                  },
                  "facts": {
                    "type": "object",
                    "properties": {
                      "checks": {
                        "minItems": 7,
                        "maxItems": 7,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "check": {
                              "type": "string",
                              "enum": [
                                "CHART",
                                "OPENING_TRIAL_BALANCE",
                                "VENDORS",
                                "PAYABLES_TIE",
                                "SUSPENSE_NIL",
                                "BANKING",
                                "PERIODS_LOCKED"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "PASSED",
                                "FAILED",
                                "NOT_READ"
                              ]
                            },
                            "count": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "cause": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "NO_IMPORT",
                                    "WAITING_FOR_APPROVAL",
                                    "NO_ACTIVE_ACCOUNTS",
                                    "NOT_NAMED",
                                    "NOT_POSTED",
                                    "WRONG_DATE",
                                    "UNBALANCED",
                                    "NO_APPLIED_IMPORT",
                                    "UNEXPLAINED",
                                    "RESIDUAL",
                                    "NOT_READ_TOO_MANY_BILLS",
                                    "DEBIT_LEFT",
                                    "CREDIT_LEFT",
                                    "IN_PAYABLE_SET",
                                    "UNVERIFIED",
                                    "WAITING_FOR_SECOND_PERSON",
                                    "TOO_MANY",
                                    "GL_NOT_LOCKED",
                                    "AP_NOT_LOCKED",
                                    "BOTH"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "check",
                            "state",
                            "count",
                            "cause"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "tie": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "CONTROL_HIGHER",
                                  "CONTROL_LOWER",
                                  "EQUAL"
                                ]
                              },
                              "unexplained": {
                                "maxItems": 6,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "ADDED_BY_JOURNAL",
                                    "TAKEN_OFF_BY_JOURNAL",
                                    "OPENING_BALANCE",
                                    "IMPORTED",
                                    "REVERSED_PAIRS",
                                    "OTHER_SOURCE"
                                  ]
                                }
                              },
                              "residual": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "direction",
                              "unexplained",
                              "residual"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "suspense": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "side": {
                                "type": "string",
                                "enum": [
                                  "DEBIT",
                                  "CREDIT",
                                  "NIL"
                                ]
                              },
                              "pendingEntries": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100000
                              },
                              "inPayableSet": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "side",
                              "pendingEntries",
                              "inPayableSet"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "opening": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "named": {
                                "type": "boolean"
                              },
                              "posted": {
                                "type": "boolean"
                              },
                              "datedOnConversion": {
                                "type": "boolean"
                              },
                              "carriesPayableLine": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "named",
                              "posted",
                              "datedOnConversion",
                              "carriesPayableLine"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "previousSystem": {
                        "type": "string",
                        "enum": [
                          "QUICKBOOKS_ONLINE",
                          "QUICKBOOKS_DESKTOP",
                          "XERO",
                          "SAGE_50",
                          "SPREADSHEET",
                          "OTHER"
                        ]
                      },
                      "itcClaimedInPreviousSystem": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "checks",
                      "tie",
                      "suspense",
                      "opening",
                      "previousSystem",
                      "itcClaimedInPreviousSystem"
                    ],
                    "additionalProperties": false
                  },
                  "figures": {
                    "type": "object",
                    "properties": {
                      "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      "suspenseMinor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "controlMinor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "subledgerMinor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "unexplainedMinor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "counts": {
                        "maxItems": 7,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "check": {
                              "type": "string",
                              "enum": [
                                "CHART",
                                "OPENING_TRIAL_BALANCE",
                                "VENDORS",
                                "PAYABLES_TIE",
                                "SUSPENSE_NIL",
                                "BANKING",
                                "PERIODS_LOCKED"
                              ]
                            },
                            "count": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "check",
                            "count"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "currency",
                      "suspenseMinor",
                      "controlMinor",
                      "subledgerMinor",
                      "unexplainedMinor",
                      "counts"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "checksDigest",
                  "checksReadAt",
                  "facts",
                  "figures"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cutoverId": {
                      "type": "string"
                    },
                    "entityTimeZone": {
                      "type": "string"
                    },
                    "why": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PROVIDER",
                            "DISCLOSURE",
                            "BUDGET",
                            "LIMIT",
                            "UNPARSABLE",
                            "REFUSED",
                            "FIGURE_INVENTED",
                            "ORDER_INVALID",
                            "NOTHING_LEFT"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "whyDetail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "order": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "CHART",
                              "OPENING_TRIAL_BALANCE",
                              "VENDORS",
                              "PAYABLES_TIE",
                              "SUSPENSE_NIL",
                              "BANKING",
                              "PERIODS_LOCKED"
                            ]
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "check": {
                            "type": "string",
                            "enum": [
                              "CHART",
                              "OPENING_TRIAL_BALANCE",
                              "VENDORS",
                              "PAYABLES_TIE",
                              "SUSPENSE_NIL",
                              "BANKING",
                              "PERIODS_LOCKED"
                            ]
                          },
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "check",
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "checksDigest": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{16}$"
                    },
                    "checksReadAt": {
                      "type": "string",
                      "minLength": 20
                    },
                    "promptVersion": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "explainedAt": {
                      "type": "string",
                      "minLength": 20
                    }
                  },
                  "required": [
                    "cutoverId",
                    "entityTimeZone",
                    "why",
                    "whyDetail",
                    "summary",
                    "order",
                    "steps",
                    "checksDigest",
                    "checksReadAt",
                    "promptVersion",
                    "explainedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers/{cutoverId}/migration-readings": {
      "get": {
        "operationId": "listMigrationReadings",
        "summary": "Lists the migration readings taken during a cutover.",
        "description": "Lists the migration readings taken during a cutover. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "SUPPLIER_LISTS",
                "OPEN_PAYABLES",
                "BANKING_FILE",
                "FIRST_MONTH"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListMigrationReadingsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bankingWithheld": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "makeMigrationReading",
        "summary": "Takes a migration reading of a cutover, comparing the ledger with the old system.",
        "description": "Takes a migration reading of a cutover, comparing the ledger with the old system. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "SUPPLIER_LISTS"
                      },
                      "leftImportIds": {
                        "minItems": 1,
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "leftImportIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "BANKING_FILE"
                      },
                      "leftImportIds": {
                        "minItems": 1,
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "leftImportIds"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "OPEN_PAYABLES"
                      },
                      "reportTotalMinor": {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      "trialBalancePayableMinor": {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "FIRST_MONTH"
                      },
                      "monthId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "kind",
                      "monthId"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMigrationReadingsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers/{cutoverId}/payables": {
      "get": {
        "operationId": "listCutoverPayables",
        "summary": "Lists the open payables carried into the ledger by a cutover.",
        "description": "Lists the open payables carried into the ledger by a cutover. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "importId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "vendorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 30
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "billId": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "number": {
                            "type": "string"
                          },
                          "billDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "dueDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "totalMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "functionalTotalMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "openMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "status": {
                            "type": "string"
                          },
                          "entryId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "entryNumber": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "importId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "billId",
                          "vendor",
                          "number",
                          "billDate",
                          "dueDate",
                          "currency",
                          "totalMinor",
                          "functionalTotalMinor",
                          "openMinor",
                          "status",
                          "entryId",
                          "entryNumber",
                          "importId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "entityTimeZone": {
                          "type": "string"
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "vendors": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                              },
                              "billedMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "openMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              }
                            },
                            "required": [
                              "currency",
                              "billedMinor",
                              "openMinor"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "functionalCurrency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "functionalTotalMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "suspenseDebitMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "tiedOut": {
                          "type": "boolean"
                        },
                        "postings": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "importId": {
                                "type": "string"
                              },
                              "fileName": {
                                "type": "string"
                              },
                              "postedBy": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "postedAt": {
                                "type": "string",
                                "minLength": 20
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "functionalTotalMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "controlTotalMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "controlNote": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "reversed": {
                                "type": "boolean"
                              },
                              "canReverse": {
                                "type": "boolean"
                              },
                              "reverseBlockers": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "billId": {
                                      "type": "string"
                                    },
                                    "number": {
                                      "type": "string"
                                    },
                                    "why": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "billId",
                                    "number",
                                    "why"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "importId",
                              "fileName",
                              "postedBy",
                              "postedAt",
                              "count",
                              "functionalTotalMinor",
                              "controlTotalMinor",
                              "controlNote",
                              "reversed",
                              "canReverse",
                              "reverseBlockers"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "postingsTotal": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "entityTimeZone",
                        "count",
                        "vendors",
                        "totals",
                        "functionalCurrency",
                        "functionalTotalMinor",
                        "suspenseDebitMinor",
                        "tiedOut",
                        "postings",
                        "postingsTotal"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "summary"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers/{cutoverId}/payables/reverse": {
      "post": {
        "operationId": "reverseCutoverPayables",
        "summary": "Reverses the open payables a cutover carried in, so they can be re-entered.",
        "description": "Reverses the open payables a cutover carried in, so they can be re-entered. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "importId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "expectedCount": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "importId",
                  "expectedCount",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "importId": {
                      "type": "string"
                    },
                    "voided": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "reversalEntries": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "importId",
                    "voided",
                    "reversalEntries"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers/{cutoverId}/settle": {
      "post": {
        "operationId": "settleCutover",
        "summary": "Settles a cutover, which posts its opening balances to the ledger.",
        "description": "Settles a cutover, which posts its opening balances to the ledger. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "checksDigest": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{16}$"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "acknowledgements": {
                    "default": [],
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "vendorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "reason": {
                          "type": "string",
                          "minLength": 3,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "vendorId",
                        "reason"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "checksDigest"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCutoverResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/cutovers/{cutoverId}/withdraw": {
      "post": {
        "operationId": "withdrawCutover",
        "summary": "Takes back an open cutover with nothing posted on it and returns the company to the go-live date it had before.",
        "description": "Takes back an open cutover with nothing posted on it and returns the company to the go-live date it had before. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "cutoverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversionDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "goLiveDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "conversionDate",
                  "goLiveDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCutoverResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions": {
      "get": {
        "operationId": "listDimensions",
        "summary": "Lists the dimension types the ledger tracks, such as department or project.",
        "description": "Lists the dimension types the ledger tracks, such as department or project. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "types": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "isSystem": {
                            "type": "boolean"
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "sortOrder": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "values": {
                            "$ref": "#/components/schemas/Values"
                          },
                          "valueCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "valuesNextCursor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "code",
                          "label",
                          "description",
                          "isSystem",
                          "active",
                          "sortOrder",
                          "values",
                          "valueCount",
                          "valuesNextCursor"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "accountPolicies": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "accountId": {
                                "type": "string"
                              },
                              "dimensionTypeId": {
                                "type": "string"
                              },
                              "policy": {
                                "type": "string",
                                "enum": [
                                  "REQUIRED",
                                  "OPTIONAL",
                                  "FORBIDDEN"
                                ]
                              }
                            },
                            "required": [
                              "accountId",
                              "dimensionTypeId",
                              "policy"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "total": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "data",
                        "nextCursor",
                        "total"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "types",
                    "accountPolicies"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/types": {
      "post": {
        "operationId": "createDimensionType",
        "summary": "Creates a dimension, such as Channel, that lines can be tagged with.",
        "description": "Creates a dimension, such as Channel, that lines can be tagged with. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{1,29}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000
                  }
                },
                "required": [
                  "code",
                  "label"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDimensionTypeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/types/{typeId}": {
      "patch": {
        "operationId": "updateDimensionType",
        "summary": "Changes the label, description or order of a dimension.",
        "description": "Changes the label, description or order of a dimension. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDimensionTypeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/types/{typeId}/archive": {
      "post": {
        "operationId": "archiveDimensionType",
        "summary": "Archives a dimension so lines are no longer tagged with it, keeping what is already tagged.",
        "description": "Archives a dimension so lines are no longer tagged with it, keeping what is already tagged. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDimensionTypeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/types/{typeId}/restore": {
      "post": {
        "operationId": "restoreDimensionType",
        "summary": "Restores an archived dimension.",
        "description": "Restores an archived dimension. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDimensionTypeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/values": {
      "post": {
        "operationId": "createDimensionValue",
        "summary": "Creates one value under a dimension type, such as a department.",
        "description": "Creates one value under a dimension type, such as a department. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dimensionTypeId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9A-Za-z._-]{1,20}$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "parentId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "dimensionTypeId",
                  "code",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValuesItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/values/{valueId}": {
      "patch": {
        "operationId": "updateDimensionValue",
        "summary": "Changes the name, parent or availability of a dimension value.",
        "description": "Changes the name, parent or availability of a dimension value. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "valueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValuesItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/values/{valueId}/merge": {
      "post": {
        "operationId": "mergeDimensionValue",
        "summary": "Merges one dimension value into another of the same type so reports roll it into the survivor.",
        "description": "Merges one dimension value into another of the same type so reports roll it into the survivor. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "valueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intoValueId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "intoValueId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MergeDimensionValueResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/values/{valueId}/unmerge": {
      "post": {
        "operationId": "unmergeDimensionValue",
        "summary": "Undoes the merge of a dimension value so it stands on its own again in reports.",
        "description": "Undoes the merge of a dimension value so it stands on its own again in reports. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "valueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repointedValueIds": {
                    "default": [],
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MergeDimensionValueResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/{typeId}/merged-values": {
      "get": {
        "operationId": "listMergedDimensionValues",
        "summary": "Lists the values of one dimension type that are merged into another, with the value each is shown as.",
        "description": "Lists the values of one dimension type that are merged into another, with the value each is shown as. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "mergedIntoId": {
                            "type": "string"
                          },
                          "mergedIntoName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "code",
                          "mergedIntoId",
                          "mergedIntoName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/dimensions/{typeId}/values": {
      "get": {
        "operationId": "listDimensionValues",
        "summary": "Lists the values of one dimension type.",
        "description": "Lists the values of one dimension type. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Values"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities": {
      "get": {
        "operationId": "listEntities",
        "summary": "Lists the companies (entities) on the ledger.",
        "description": "Lists the companies (entities) on the ledger. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListEntitiesResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "createEntity",
        "summary": "Creates a company (entity) on the ledger.",
        "description": "Creates a company (entity) on the ledger. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "functionalCurrency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "country": {
                    "type": "string",
                    "enum": [
                      "CA",
                      "US"
                    ]
                  },
                  "region": {
                    "type": "string",
                    "pattern": "^(CA|US)-[A-Z]{2}$"
                  },
                  "fiscalYearEndMonth": {
                    "default": 12,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "legalForm": {
                    "type": "string",
                    "enum": [
                      "CORPORATION",
                      "SOLE_PROPRIETORSHIP",
                      "PARTNERSHIP",
                      "TRUST"
                    ]
                  },
                  "timeZone": {
                    "default": "America/Toronto",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "incorporatedOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "seedCoa": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "functionalCurrency",
                  "country"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entity": {
                      "$ref": "#/components/schemas/ListEntitiesResponseItem"
                    },
                    "accountsCreated": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "accountsActivated": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "entity",
                    "accountsCreated",
                    "accountsActivated"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities/{entityId}": {
      "get": {
        "operationId": "getEntity",
        "summary": "Returns one company on the ledger with its settings.",
        "description": "Returns one company on the ledger with its settings. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListEntitiesResponseItem"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "patch": {
        "operationId": "updateEntity",
        "summary": "Changes a company's name, year end or other settings.",
        "description": "Changes a company's name, year end or other settings. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "region": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(CA|US)-[A-Z]{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fiscalYearEndMonth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "timeZone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "incorporatedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "legalForm": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "CORPORATION",
                          "SOLE_PROPRIETORSHIP",
                          "PARTNERSHIP",
                          "TRUST"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exchangeDifferenceAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "customerDepositsAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "holdbackReceivableAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "receivableAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "defaultSalesAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "invoiceTerms": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "invoiceTermsFr": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "goLiveDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "acknowledgeBudgetRewindow": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "changed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "entity": {
                      "$ref": "#/components/schemas/ListEntitiesResponseItem"
                    },
                    "strandedAssets": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "assetId": {
                                "type": "string"
                              },
                              "assetName": {
                                "type": "string"
                              },
                              "inServiceOn": {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              "reason": {
                                "type": "string"
                              },
                              "remedy": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "assetId",
                              "assetName",
                              "inServiceOn",
                              "reason",
                              "remedy"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "total",
                        "assets"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "changed",
                    "entity"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities/{entityId}/invoice-template": {
      "get": {
        "operationId": "getInvoiceTemplate",
        "summary": "Returns the invoice template a company issues invoices with.",
        "description": "Returns the invoice template a company issues invoices with. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInvoiceTemplateResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "patch": {
        "operationId": "updateInvoiceTemplate",
        "summary": "Changes the invoice template a company issues invoices with.",
        "description": "Changes the invoice template a company issues invoices with. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "showItemCode": {
                    "type": "boolean"
                  },
                  "showServicePeriod": {
                    "type": "boolean"
                  },
                  "showDiscount": {
                    "type": "boolean"
                  },
                  "showOriginAndHsCode": {
                    "type": "boolean"
                  },
                  "showCustomFields": {
                    "type": "boolean"
                  },
                  "footerNote": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "termsText": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInvoiceTemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities/{entityId}/invoice-template/logo/remove": {
      "post": {
        "operationId": "removeInvoiceLogo",
        "summary": "Removes the logo from a company's invoices.",
        "description": "Removes the logo from a company's invoices. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInvoiceTemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities/{entityId}/specific-provisions": {
      "get": {
        "operationId": "listSpecificProvisions",
        "summary": "Lists the specific provisions recorded for a company.",
        "description": "Lists the specific provisions recorded for a company. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "activeOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListSpecificProvisionsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "createSpecificProvision",
        "summary": "Records a specific provision for a company.",
        "description": "Records a specific provision for a company. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customerId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "amountMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "effectiveFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "effectiveTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "customerId",
                  "amountMinor",
                  "reason",
                  "effectiveFrom"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSpecificProvisionsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities/{entityId}/specific-provisions/{provisionId}": {
      "patch": {
        "operationId": "updateSpecificProvision",
        "summary": "Changes a specific provision.",
        "description": "Changes a specific provision. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amountMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "effectiveFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "effectiveTo": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSpecificProvisionsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities/{entityId}/specific-provisions/{provisionId}/remove": {
      "post": {
        "operationId": "removeSpecificProvision",
        "summary": "Removes a specific provision.",
        "description": "Removes a specific provision. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "removed": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "id",
                    "removed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entities/{entityId}/year-end": {
      "get": {
        "operationId": "getYearEndSettings",
        "summary": "Returns the year end settings of a company.",
        "description": "Returns the year end settings of a company. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetYearEndSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "patch": {
        "operationId": "updateYearEndSettings",
        "summary": "Changes the year end settings of a company.",
        "description": "Changes the year end settings of a company. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allowanceMethod": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "AGEING_BUCKETS",
                          "SPECIFIC_PROVISIONS",
                          "COMBINED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "allowanceAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unrealizedFxAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "badDebtAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "rates": {
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RatesItem"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetYearEndSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries": {
      "get": {
        "operationId": "listEntries",
        "summary": "Lists the journal entries on the ledger, newest first, with the server's total.",
        "description": "Lists the journal entries on the ledger, newest first, with the server's total. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "PROPOSED",
                "IN_REVIEW",
                "APPROVED",
                "POSTED",
                "DECLINED",
                "REVERSED"
              ]
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(DRAFT|PROPOSED|IN_REVIEW|APPROVED|POSTED|DECLINED|REVERSED)(,(DRAFT|PROPOSED|IN_REVIEW|APPROVED|POSTED|DECLINED|REVERSED))*$"
            }
          },
          {
            "name": "sourceKind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MANUAL",
                "AGENT_PROPOSAL",
                "RECURRING",
                "REVERSAL",
                "IMPORT",
                "CHAT",
                "MIGRATION",
                "PAYMENT_RUN",
                "INVOICE",
                "RECEIPT",
                "BILL",
                "BILL_SETTLEMENT",
                "VENDOR_CREDIT"
              ]
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "scheduleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "default": "newest",
              "type": "string",
              "enum": [
                "newest",
                "oldest"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "receiptVoids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "grouped"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "entryNumber": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "entryRef": {
                            "type": "string"
                          },
                          "entryDate": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "DRAFT",
                              "PROPOSED",
                              "IN_REVIEW",
                              "APPROVED",
                              "POSTED",
                              "DECLINED",
                              "REVERSED"
                            ]
                          },
                          "sourceKind": {
                            "type": "string",
                            "enum": [
                              "MANUAL",
                              "AGENT_PROPOSAL",
                              "RECURRING",
                              "REVERSAL",
                              "IMPORT",
                              "CHAT",
                              "MIGRATION",
                              "PAYMENT_RUN",
                              "INVOICE",
                              "RECEIPT",
                              "BILL",
                              "BILL_SETTLEMENT",
                              "VENDOR_CREDIT"
                            ]
                          },
                          "memo": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "entityTimeZone": {
                            "type": "string"
                          },
                          "attribution": {
                            "type": "string"
                          },
                          "totalDebitMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "entryNumber",
                          "entryRef",
                          "entryDate",
                          "status",
                          "sourceKind",
                          "memo",
                          "entityId",
                          "entityName",
                          "entityTimeZone",
                          "attribution",
                          "totalDebitMinor",
                          "currency"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "createEntry",
        "summary": "Creates a draft journal entry with its lines on the ledger.",
        "description": "Creates a draft journal entry with its lines on the ledger. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "entryDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "memo": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "postImmediately": {
                    "default": false,
                    "type": "boolean"
                  },
                  "autoReverse": {
                    "default": false,
                    "type": "boolean"
                  },
                  "reversalDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "lines": {
                    "minItems": 2,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "debitMajor": {
                          "default": "",
                          "type": "string"
                        },
                        "creditMajor": {
                          "default": "",
                          "type": "string"
                        },
                        "memo": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "dimensions": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/DimensionsItem"
                          }
                        },
                        "tax": {
                          "$ref": "#/components/schemas/Tax"
                        },
                        "customFields": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,39}$"
                          },
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "boolean"
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "accountId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "tax": {
                    "$ref": "#/components/schemas/Tax2"
                  },
                  "customFields": {
                    "$ref": "#/components/schemas/CustomFields"
                  }
                },
                "required": [
                  "entityId",
                  "entryDate",
                  "currency",
                  "lines"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/bulk-approve": {
      "post": {
        "operationId": "bulkApprove",
        "summary": "Approves several journal entries in one request, each checked on its own.",
        "description": "Approves several journal entries in one request, each checked on its own. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entryIds": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "entryIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "failures": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "entryId": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "entryId",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "approved",
                    "failures"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/{entryId}": {
      "get": {
        "operationId": "getEntry",
        "summary": "Returns one journal entry with its lines and its status.",
        "description": "Returns one journal entry with its lines and its status. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/{entryId}/approve": {
      "post": {
        "operationId": "approveEntry",
        "summary": "Approves a submitted journal entry so that it can be posted.",
        "description": "Approves a submitted journal entry so that it can be posted. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/{entryId}/decline": {
      "post": {
        "operationId": "declineEntry",
        "summary": "Declines a submitted journal entry and returns it to its author with a reason.",
        "description": "Declines a submitted journal entry and returns it to its author with a reason. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "fault": {
                    "type": "string",
                    "enum": [
                      "WRONG_ACCOUNT",
                      "WRONG_TAX",
                      "WRONG_DIMENSIONS",
                      "DUPLICATE",
                      "NOT_OURS",
                      "OTHER"
                    ]
                  },
                  "correctAccountCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "memoContains": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "proposeRule": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/{entryId}/post": {
      "post": {
        "operationId": "postEntry",
        "summary": "Posts an approved journal entry to the general ledger.",
        "description": "Posts an approved journal entry to the general ledger. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/{entryId}/reopen": {
      "post": {
        "operationId": "reopenEntry",
        "summary": "Reopens a posted journal entry for correction, returning it to draft.",
        "description": "Reopens a posted journal entry for correction, returning it to draft. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/{entryId}/reverse": {
      "post": {
        "operationId": "reverseEntry",
        "summary": "Reverses a posted journal entry with an offsetting entry.",
        "description": "Reverses a posted journal entry with an offsetting entry. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memo": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/entries/{entryId}/submit": {
      "post": {
        "operationId": "submitEntry",
        "summary": "Submits a draft journal entry for approval.",
        "description": "Submits a draft journal entry for approval. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/fx": {
      "get": {
        "operationId": "listFxRates",
        "summary": "Lists the foreign exchange rates the ledger uses.",
        "description": "Lists the foreign exchange rates the ledger uses. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "BOC",
                "MANUAL",
                "PROVIDER",
                "IMPORTED"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListFxRatesResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imported": {
                      "$ref": "#/components/schemas/Imported"
                    },
                    "totals": {
                      "$ref": "#/components/schemas/Totals"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "ALL",
                        "NATIVE",
                        "IMPORTED"
                      ]
                    },
                    "zone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "imported",
                    "totals",
                    "origin",
                    "zone"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/fx/override": {
      "post": {
        "operationId": "overrideFx",
        "summary": "Overrides the exchange rate for one currency and day.",
        "description": "Overrides the exchange rate for one currency and day. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rateDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "base": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "quote": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "rate": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,6})?$"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "fromImportedHistoryId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  }
                },
                "required": [
                  "rateDate",
                  "base",
                  "quote",
                  "rate",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFxRatesResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/fx/override/remove": {
      "post": {
        "operationId": "removeFxOverride",
        "summary": "Takes back this ledger's own exchange rate for one currency and day, so the observed rate converts again.",
        "description": "Takes back this ledger's own exchange rate for one currency and day, so the observed rate converts again. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rateDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "base": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "quote": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "setRate": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,6})?$"
                  },
                  "restore": {
                    "type": "object",
                    "properties": {
                      "rate": {
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d{1,6})?$"
                      },
                      "reason": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "wasEnteredById": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "rate",
                      "reason"
                    ],
                    "additionalProperties": false
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "rateDate",
                  "base",
                  "quote",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFxRatesResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/imported-history": {
      "get": {
        "operationId": "listImportedHistory",
        "summary": "Lists the history imported from an earlier system, with the server's total.",
        "description": "Lists the history imported from an earlier system, with the server's total. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AUDIT_LINE",
                "CONTROL_FIRING",
                "PERIOD_LOCK",
                "REPORT_PACK",
                "SLIP_FILE",
                "FX_RATE",
                "SCHEDULE",
                "QUEUE_DECISION",
                "TAX_OVERRIDE",
                "PAID_BILL",
                "VENDOR_PAYMENT"
              ]
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "importId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "vendorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "placement",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PLACED",
                "UNPLACED"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListImportedHistoryResponse"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/imported-history/{recordId}": {
      "get": {
        "operationId": "getImportedHistoryRecord",
        "summary": "Returns one record of imported history.",
        "description": "Returns one record of imported history. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-eliminations/{intercompanyEliminationId}/void": {
      "post": {
        "operationId": "voidIntercompanyElimination",
        "summary": "Voids an elimination entry for an intercompany pair.",
        "description": "Voids an elimination entry for an intercompany pair. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "intercompanyEliminationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EliminationsItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs": {
      "get": {
        "operationId": "listIntercompanyPairs",
        "summary": "Lists the intercompany pairs, with the server's total.",
        "description": "Lists the intercompany pairs, with the server's total. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "NO_MIRROR",
                  "MIRROR_DRAFT",
                  "MATCHED",
                  "DIFFERS",
                  "MIRROR_VOID",
                  "BILL_VOID",
                  "DECLINED"
                ]
              }
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "counterpartyEntityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoiceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "elimination",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "posted",
                "stale",
                "byHand"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "billDate",
                "difference",
                "state"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "from": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "identityHue": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "identityHue"
                            ],
                            "additionalProperties": false
                          },
                          "to": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "identityHue": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "identityHue"
                            ],
                            "additionalProperties": false
                          },
                          "bill": {
                            "$ref": "#/components/schemas/Bill"
                          },
                          "decision": {
                            "type": "string",
                            "enum": [
                              "PROPOSED",
                              "MIRRORED",
                              "DECLINED"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "NO_MIRROR",
                              "MIRROR_DRAFT",
                              "MATCHED",
                              "DIFFERS",
                              "MIRROR_VOID",
                              "BILL_VOID",
                              "DECLINED"
                            ]
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "CURRENCY",
                                "NET",
                                "TAX",
                                "WRONG_CUSTOMER",
                                "MIRROR_WRITTEN_OFF"
                              ]
                            }
                          },
                          "differences": {
                            "$ref": "#/components/schemas/Differences2"
                          },
                          "mirror": {
                            "$ref": "#/components/schemas/Mirror"
                          },
                          "mirrorHidden": {
                            "type": "boolean"
                          },
                          "mirrorHow": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "CREATED",
                                  "LINKED"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "elimination": {
                            "$ref": "#/components/schemas/Elimination"
                          },
                          "proposedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "proposedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "entityTimeZone": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "from",
                          "to",
                          "bill",
                          "decision",
                          "state",
                          "reasons",
                          "differences",
                          "mirror",
                          "mirrorHidden",
                          "mirrorHow",
                          "elimination",
                          "proposedBy",
                          "proposedAt",
                          "entityTimeZone"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "enum": [
                          "NO_MIRROR",
                          "MIRROR_DRAFT",
                          "MATCHED",
                          "DIFFERS",
                          "MIRROR_VOID",
                          "BILL_VOID",
                          "DECLINED"
                        ]
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "required": [
                        "NO_MIRROR",
                        "MIRROR_DRAFT",
                        "MATCHED",
                        "DIFFERS",
                        "MIRROR_VOID",
                        "BILL_VOID",
                        "DECLINED"
                      ]
                    },
                    "staleEliminations": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "counts",
                    "staleEliminations"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/look-back": {
      "post": {
        "operationId": "intercompanyLookBack",
        "summary": "Looks back over the ledger for intercompany transactions that were not paired.",
        "description": "Looks back over the ledger for intercompany transactions that were not paired. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "after": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "entityId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "examined": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "proposed": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "alreadyProposed": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "skippedConversion": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "skippedOwnCompany": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "atLimit": {
                      "type": "boolean"
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "examined",
                    "proposed",
                    "alreadyProposed",
                    "skippedConversion",
                    "skippedOwnCompany",
                    "atLimit",
                    "next"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}": {
      "get": {
        "operationId": "getIntercompanyPair",
        "summary": "Returns one intercompany pair with its two sides.",
        "description": "Returns one intercompany pair with its two sides. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIntercompanyPairResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/audit": {
      "get": {
        "operationId": "listIntercompanyAudit",
        "summary": "Lists the audit trail of one intercompany pair.",
        "description": "Lists the audit trail of one intercompany pair. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "decisions",
                "eliminations",
                "readings"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/candidates": {
      "get": {
        "operationId": "listIntercompanyCandidates",
        "summary": "Lists the transactions that may pair with an intercompany pair.",
        "description": "Lists the transactions that may pair with an intercompany pair. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BestCandidateOption1"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/decline": {
      "post": {
        "operationId": "declineIntercompanyPair",
        "summary": "Declines an intercompany pair with a reason.",
        "description": "Declines an intercompany pair with a reason. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIntercompanyPairResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/elimination-preview": {
      "get": {
        "operationId": "previewIntercompanyElimination",
        "summary": "Previews the elimination entry for an intercompany pair.",
        "description": "Previews the elimination entry for an intercompany pair. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asAt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pairId": {
                      "type": "string"
                    },
                    "asAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "today": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ok": {
                      "type": "boolean"
                    },
                    "blockers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "FUTURE",
                              "NOT_MATCHED",
                              "CURRENCY",
                              "FISCAL_YEAR",
                              "NOT_POSTED",
                              "NOT_PLAIN",
                              "OPEN_DIFFERS",
                              "NOTHING_TO_ELIMINATE"
                            ]
                          },
                          "sentence": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "sentence"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "entity": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "identityHue": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "identityHue"
                            ],
                            "additionalProperties": false
                          },
                          "account": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "code",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "entity",
                          "account",
                          "amountMinor",
                          "position"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "eliminatedBalanceMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "eliminatedNetMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "billOpenMinor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "invoiceOpenMinor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "digest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 64,
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "pairId",
                    "asAt",
                    "today",
                    "currency",
                    "ok",
                    "blockers",
                    "lines",
                    "eliminatedBalanceMinor",
                    "eliminatedNetMinor",
                    "billOpenMinor",
                    "invoiceOpenMinor",
                    "digest"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/eliminations": {
      "post": {
        "operationId": "postIntercompanyElimination",
        "summary": "Posts the elimination entry for an intercompany pair.",
        "description": "Posts the elimination entry for an intercompany pair. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "COMPUTED"
                      },
                      "asAt": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "digest": {
                        "type": "string",
                        "minLength": 64,
                        "maxLength": 64
                      },
                      "note": {
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "kind",
                      "asAt",
                      "digest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "BY_HAND"
                      },
                      "asAt": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "note": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "kind",
                      "asAt",
                      "note"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EliminationsItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/mirror-preview": {
      "get": {
        "operationId": "previewIntercompanyMirror",
        "summary": "Previews the mirror entry for an intercompany pair before it is created.",
        "description": "Previews the mirror entry for an intercompany pair before it is created. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pairId": {
                      "type": "string"
                    },
                    "issueDate": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "dueDate": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "plan": {
                          "type": "string",
                          "enum": [
                            "EXISTS",
                            "WILL_BE_CREATED",
                            "NEEDS_APPROVAL",
                            "NAME_TAKEN"
                          ]
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "displayName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "plan",
                        "id",
                        "displayName"
                      ],
                      "additionalProperties": false
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "position": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "description": {
                            "type": "string"
                          },
                          "quantity": {
                            "type": "string"
                          },
                          "netMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "accountId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "accountLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "HISTORY_SAME_DESCRIPTION",
                              "ASSISTANT",
                              "HISTORY_CUSTOMER",
                              "NONE"
                            ]
                          },
                          "billable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "position",
                          "description",
                          "quantity",
                          "netMinor",
                          "accountId",
                          "accountLabel",
                          "source",
                          "billable"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "readingState": {
                      "type": "string",
                      "enum": [
                        "OFF",
                        "NOT_NEEDED",
                        "WAITING",
                        "READ",
                        "STOPPED",
                        "FAILED"
                      ]
                    },
                    "blockers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "sentence": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "sentence"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "digest": {
                      "type": "string",
                      "minLength": 64,
                      "maxLength": 64
                    }
                  },
                  "required": [
                    "pairId",
                    "issueDate",
                    "dueDate",
                    "currency",
                    "customer",
                    "lines",
                    "readingState",
                    "blockers",
                    "digest"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/readings": {
      "post": {
        "operationId": "readIntercompanyMirror",
        "summary": "Asks for the accounts behind an intercompany pair to be read again, and answers at once; the reading follows.",
        "description": "Asks for the accounts behind an intercompany pair to be read again, and answers at once; the reading follows. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted: the work is done after the answer, or waits for a person's confirmation.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attempt": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3
                    }
                  },
                  "required": [
                    "attempt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/reopen": {
      "post": {
        "operationId": "reopenIntercompanyPair",
        "summary": "Reopens a declined intercompany pair.",
        "description": "Reopens a declined intercompany pair. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIntercompanyPairResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/intercompany-pairs/{intercompanyPairId}/unlink": {
      "post": {
        "operationId": "unlinkIntercompanyInvoice",
        "summary": "Removes an invoice from an intercompany pair.",
        "description": "Removes an invoice from an intercompany pair. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "intercompanyPairId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIntercompanyPairResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/migration-readings/{readingId}": {
      "get": {
        "operationId": "getMigrationReading",
        "summary": "Returns one migration reading with its figures.",
        "description": "Returns one migration reading with its figures. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "readingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMigrationReadingsResponseItem"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/migration-readings/{readingId}/assistant": {
      "post": {
        "operationId": "runMigrationAssistant",
        "summary": "Runs the migration assistant on a reading's open findings.",
        "description": "Runs the migration assistant on a reading's open findings. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "readingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "readingId": {
                      "type": "string"
                    },
                    "requestedBy": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "requestedAt": {
                      "type": "string",
                      "minLength": 20
                    },
                    "pair": {
                      "$ref": "#/components/schemas/Pair"
                    },
                    "note": {
                      "$ref": "#/components/schemas/Pair"
                    },
                    "findingsWritten": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "entityTimeZone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "readingId",
                    "requestedBy",
                    "requestedAt",
                    "pair",
                    "note",
                    "findingsWritten",
                    "entityTimeZone"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/migration-readings/{readingId}/findings": {
      "get": {
        "operationId": "listMigrationFindings",
        "summary": "Lists the findings of one migration reading.",
        "description": "Lists the findings of one migration reading. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "readingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cause",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Cause"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "NEEDS_LOOK",
                "FYI"
              ]
            }
          },
          {
            "name": "proposal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "waiting",
                "decided"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListMigrationFindingsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/migration-readings/{readingId}/findings/{findingId}/accept": {
      "post": {
        "operationId": "acceptMigrationFinding",
        "summary": "Accepts a migration finding as explained.",
        "description": "Accepts a migration finding as explained. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "readingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "findingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMigrationFindingsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/migration-readings/{readingId}/findings/{findingId}/change": {
      "post": {
        "operationId": "changeMigrationFinding",
        "summary": "Changes a migration finding to a different treatment.",
        "description": "Changes a migration finding to a different treatment. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "readingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "findingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "class": {
                        "type": "string",
                        "enum": [
                          "TIMING",
                          "CLASSIFICATION",
                          "TAX_TREATMENT",
                          "MISSING_SOURCE",
                          "OUR_DEFECT",
                          "THEIR_DEFECT",
                          "UNEXPLAINED"
                        ]
                      },
                      "explanation": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "class",
                      "explanation"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "enum": [
                          "PAID_OR_PART_PAID",
                          "CREDIT_OR_ADJUSTMENT",
                          "DISPUTED_OR_ON_HOLD",
                          "DUPLICATE_OF_ANOTHER",
                          "INACTIVE_OR_CLOSED",
                          "MERGED_OR_RENAMED",
                          "NOTHING_STATED"
                        ]
                      }
                    },
                    "required": [
                      "reason"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMigrationFindingsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/migration-readings/{readingId}/findings/{findingId}/decline": {
      "post": {
        "operationId": "declineMigrationFinding",
        "summary": "Declines a migration finding with a reason.",
        "description": "Declines a migration finding with a reason. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "readingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "findingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMigrationFindingsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months": {
      "get": {
        "operationId": "listParallelRunMonths",
        "summary": "Lists the months in a parallel run against a second system.",
        "description": "Lists the months in a parallel run against a second system. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "periodYear": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "periodMonth": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "periodLabel": {
                            "type": "string"
                          },
                          "periodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "CLEAN",
                              "NOT_CLEAN"
                            ]
                          },
                          "partnerSystem": {
                            "type": "string"
                          },
                          "partnerClosedOn": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "partnerCloseDays": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ourCloseDays": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recordedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "recordedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "signedOffBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "signedOffAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "differencesByClass": {
                            "$ref": "#/components/schemas/DifferencesByClass"
                          },
                          "unclassifiedDifferences": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "entityId",
                          "entityName",
                          "periodYear",
                          "periodMonth",
                          "periodLabel",
                          "periodEnd",
                          "status",
                          "partnerSystem",
                          "partnerClosedOn",
                          "partnerCloseDays",
                          "ourCloseDays",
                          "recordedBy",
                          "recordedAt",
                          "signedOffBy",
                          "signedOffAt",
                          "differencesByClass",
                          "unclassifiedDifferences",
                          "note"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "recordParallelRunMonth",
        "summary": "Records a month of parallel-run figures from this ledger.",
        "description": "Records a month of parallel-run figures from this ledger. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "periodYear": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100
                  },
                  "periodMonth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "partnerSystem": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "partnerClosedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "entityId",
                  "periodYear",
                  "periodMonth",
                  "partnerSystem"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}": {
      "get": {
        "operationId": "getParallelRunMonth",
        "summary": "Returns one month of a parallel run with its lines and its differences.",
        "description": "Returns one month of a parallel run with its lines and its differences. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "comparison",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "CLOSE_TIME",
                "TRIAL_BALANCE",
                "STATEMENT",
                "RETURN",
                "PAYABLES"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}/lines/{lineId}": {
      "patch": {
        "operationId": "classifyParallelRunLine",
        "summary": "Classifies one parallel-run difference as explained or open.",
        "description": "Classifies one parallel-run difference as explained or open. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "class": {
                    "type": "string",
                    "enum": [
                      "TIMING",
                      "CLASSIFICATION",
                      "TAX_TREATMENT",
                      "MISSING_SOURCE",
                      "OUR_DEFECT",
                      "THEIR_DEFECT",
                      "UNEXPLAINED"
                    ]
                  },
                  "explanation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "proposalId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "class",
                  "explanation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}/payables": {
      "post": {
        "operationId": "compareParallelRunPayables",
        "summary": "Compares the payables of a parallel-run month with the other system.",
        "description": "Compares the payables of a parallel-run month with the other system. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}/proposals": {
      "post": {
        "operationId": "proposeParallelRunPayables",
        "summary": "Proposes the payables a parallel run should show, for a person to decide.",
        "description": "Proposes the payables a parallel run should show, for a person to decide. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "examined": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "leftForYou": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "alreadyProposed": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "proposed": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "byBasis": {
                      "type": "object",
                      "properties": {
                        "rule": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "model": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "rule",
                        "model"
                      ],
                      "additionalProperties": false
                    },
                    "pairs": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "nothingMatched": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "ambiguous": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "evidenceNotKept": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "hiddenAfterDecline": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "modelWhy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "DISCLOSURE",
                            "BUDGET",
                            "PROVIDER",
                            "UNPARSABLE",
                            "REFUSED",
                            "UNKNOWN_REF",
                            "STOPPED_AFTER_THREE_DECLINES"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "modelPairsLeftOut": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "examined",
                    "leftForYou",
                    "alreadyProposed",
                    "proposed",
                    "byBasis",
                    "pairs",
                    "nothingMatched",
                    "ambiguous",
                    "evidenceNotKept",
                    "hiddenAfterDecline",
                    "modelWhy",
                    "modelPairsLeftOut"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "get": {
        "operationId": "listParallelRunProposals",
        "summary": "Lists the proposals raised by a parallel run for one month.",
        "description": "Lists the proposals raised by a parallel run for one month. Needs the `statements:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "statements:read",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "default": "ALL",
              "type": "string",
              "enum": [
                "WAITING",
                "OUT_OF_DATE",
                "SET_BY_HAND",
                "ACCEPTED",
                "EDITED",
                "DECLINED",
                "ALL"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProposalOption1"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}/proposals/{parallelRunProposalId}/accept": {
      "post": {
        "operationId": "acceptParallelRunProposal",
        "summary": "Accepts a parallel-run proposal, which applies its change.",
        "description": "Accepts a parallel-run proposal, which applies its change. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parallelRunProposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}/proposals/{parallelRunProposalId}/decline": {
      "post": {
        "operationId": "declineParallelRunProposal",
        "summary": "Declines a parallel-run proposal with a reason.",
        "description": "Declines a parallel-run proposal with a reason. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parallelRunProposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}/sign-off": {
      "post": {
        "operationId": "signOffParallelRunMonth",
        "summary": "Signs off one parallel-run month as matching or explained.",
        "description": "Signs off one parallel-run month as matching or explained. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "partnerClosedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/parallel-run/months/{monthId}/theirs": {
      "post": {
        "operationId": "importPartnerFigures",
        "summary": "Imports the figures the other system produced for one parallel-run month.",
        "description": "Imports the figures the other system produced for one parallel-run month. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "monthId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "csv": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 524288
                  },
                  "defaultComparison": {
                    "type": "string",
                    "const": "PAYABLES"
                  }
                },
                "required": [
                  "csv"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetParallelRunMonthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/schedules": {
      "get": {
        "operationId": "listSchedules",
        "summary": "Lists the recurring schedules that post or raise bills on a set cadence.",
        "description": "Lists the recurring schedules that post or raise bills on a set cadence. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ALL",
                "NATIVE",
                "IMPORTED"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListSchedulesResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imported": {
                      "$ref": "#/components/schemas/Imported"
                    },
                    "totals": {
                      "$ref": "#/components/schemas/Totals"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "ALL",
                        "NATIVE",
                        "IMPORTED"
                      ]
                    },
                    "zone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "imported",
                    "totals",
                    "origin",
                    "zone"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/schedules/active": {
      "post": {
        "operationId": "setScheduleActive",
        "summary": "Pauses or resumes a recurring schedule.",
        "description": "Pauses or resumes a recurring schedule. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduleId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "restoreNextRunDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "scheduleId",
                  "active"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/schedules/follow-bill": {
      "post": {
        "operationId": "followScheduleBill",
        "summary": "Makes a recurring schedule follow a bill.",
        "description": "Makes a recurring schedule follow a bill. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduleId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "billId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "signalId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "scheduleId",
                  "billId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scheduleId": {
                      "type": "string"
                    },
                    "billId": {
                      "type": "string"
                    },
                    "number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "subtotalMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "lineCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "confirmedSignalId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "scheduleId",
                    "billId",
                    "number",
                    "subtotalMinor",
                    "lineCount",
                    "confirmedSignalId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/schedules/promote": {
      "post": {
        "operationId": "promoteToSchedule",
        "summary": "Turns a bill or entry into a recurring schedule.",
        "description": "Turns a bill or entry into a recurring schedule. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entryId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "WEEKLY",
                      "BIWEEKLY",
                      "MONTHLY",
                      "QUARTERLY",
                      "ANNUAL"
                    ]
                  },
                  "startDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "endDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "autoReverse": {
                    "default": false,
                    "type": "boolean"
                  },
                  "reversalOffsetDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90
                  }
                },
                "required": [
                  "entryId",
                  "name",
                  "frequency",
                  "startDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSchedulesResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/schedules/repeat-bill": {
      "post": {
        "operationId": "repeatBill",
        "summary": "Makes a recurring schedule from a posted bill, so the bill is raised again each period.",
        "description": "Makes a recurring schedule from a posted bill, so the bill is raised again each period. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "accounting"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "WEEKLY",
                      "BIWEEKLY",
                      "MONTHLY",
                      "QUARTERLY",
                      "ANNUAL"
                    ]
                  },
                  "startDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "endDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "billId",
                  "name",
                  "frequency",
                  "startDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSchedulesResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    }
  },
  "webhooks": {},
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "evk_ API key",
        "description": "A key an administrator of the books made in the app. It reads, or reads and drafts, on one ledger."
      },
      "oauth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "An access token for a person who connected an app. Its audience is https://api.eternifylabs.com/v1. The app acts with that person's own role, inside what they allowed."
      }
    },
    "schemas": {
      "Acceptance": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/AutoCompletedOption1"
          },
          {
            "type": "null"
          }
        ]
      },
      "Account": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "AuditLogResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/History"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "imported": {
            "$ref": "#/components/schemas/Imported"
          },
          "totals": {
            "$ref": "#/components/schemas/Totals"
          },
          "origin": {
            "type": "string",
            "enum": [
              "ALL",
              "NATIVE",
              "IMPORTED"
            ]
          },
          "zone": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "nextCursor",
          "total",
          "imported",
          "totals",
          "origin",
          "zone"
        ],
        "additionalProperties": false
      },
      "AutoCompletedOption1": {
        "type": "object",
        "properties": {
          "n": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "of": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "n",
          "of"
        ],
        "additionalProperties": false
      },
      "BestCandidateOption1": {
        "type": "object",
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/MirrorOption1"
          },
          "grade": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "EXACT",
                  "LIKELY",
                  "NEAR"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalDifferenceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "unavailable": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "invoice",
          "grade",
          "days",
          "totalDifferenceMinor"
        ],
        "additionalProperties": false
      },
      "Bill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplierName": {
            "type": "string"
          },
          "billDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "IN_REVIEW",
              "DECLINED",
              "APPROVED",
              "HELD",
              "OPEN",
              "DUE",
              "OVERDUE",
              "IN_RUN",
              "PARTIALLY_PAID",
              "PAID",
              "VOID"
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "subtotalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "taxMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "totalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "openMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          }
        },
        "required": [
          "id",
          "number",
          "supplierName",
          "billDate",
          "status",
          "currency",
          "subtotalMinor",
          "taxMinor",
          "totalMinor",
          "openMinor"
        ],
        "additionalProperties": false
      },
      "Cause": {
        "type": "string",
        "enum": [
          "OWED_NOT_LISTED",
          "OWED_LISTED_NOT_YET_IN_BOOKS",
          "OWED_UNDER_ANOTHER_NAME",
          "OWED_SUPPLIER_ARCHIVED",
          "OWED_NOT_PLACED",
          "LISTED_TWICE",
          "LISTED_NOT_IN_BOOKS",
          "NAME_PAIR_READ",
          "ROW_HELD",
          "CREDIT_ROW",
          "BALANCE_CHANGED_BY_HAND",
          "TOTAL_REMAINDER",
          "TRIAL_BALANCE_DIFFERS",
          "POSTED_DIFFERS_FROM_FILE",
          "NOTE_READ",
          "OWED_NO_BANKING",
          "OWED_BANKING_FILE_IN_REVIEW",
          "OWED_BANKING_WAITING",
          "BANKING_ROW_UNKNOWN_SUPPLIER",
          "BANKING_DIFFERS_FROM_VERIFIED",
          "CONVERSION_ROWS_NOT_POSTED"
        ]
      },
      "Code": {
        "type": "string",
        "x-extensible-enum": [
          "validation_failed",
          "unauthenticated",
          "permission_denied",
          "not_found",
          "precondition_failed",
          "idempotency_conflict",
          "idempotency_in_flight",
          "conflict",
          "counterparty_link_taken",
          "payload_too_large",
          "write_conflict",
          "audit_chain_order",
          "unsupported_version",
          "service_unavailable",
          "not_implemented",
          "rate_limited",
          "payment_required",
          "bad_gateway",
          "internal_error",
          "account_not_active",
          "approval_required",
          "currency_tuple",
          "dimension_policy",
          "entry_changed",
          "gifi_code",
          "gifi_mismatch",
          "gifi_reserved_total",
          "illegal_transition",
          "invalid_draft",
          "invalid_money",
          "materiality_exceeded",
          "payment_file_invalid",
          "period_locked",
          "separation_of_duties",
          "tax_account_not_recurring",
          "tax_check_finding_not_open",
          "unbalanced_entry",
          "invalid_tax_input",
          "unsupported_tax_rule",
          "ai_budget_exceeded",
          "disclosure_not_accepted",
          "invalid_prompt",
          "model_output_unparsable",
          "model_refused",
          "connector_sync_unavailable",
          "no_model_provider",
          "not_in_review_queue",
          "company_domain_personal",
          "company_domain_missing",
          "company_not_found",
          "company_person_not_listed",
          "provider_key_missing",
          "provider_key_refused",
          "provider_unavailable",
          "provider_credits_exhausted",
          "api_key_label_taken",
          "api_key_cap_reached",
          "api_key_already_revoked",
          "api_key_revoked",
          "api_key_expired",
          "public_api_field_not_allowed",
          "public_api_unknown_field",
          "public_api_unknown_parameter",
          "public_api_body_too_large",
          "api_key_warehouse_needs_admin",
          "connection_schedule_shape",
          "connection_schedule_too_frequent",
          "connection_time_zone_unknown",
          "connection_target_required",
          "connection_target_not_allowed",
          "connection_target_not_on_ledger",
          "connection_unsupported_provider",
          "connection_not_ready",
          "connection_ends_on_passed",
          "connection_schedule_not_set",
          "connection_not_stopped",
          "connection_not_a_bank_feed",
          "connection_suggestion_decided",
          "connection_seat_cannot_administer",
          "connection_company_required",
          "connection_suggestion_required",
          "connection_ledger_not_found",
          "connection_history_seat",
          "connection_history_page_size",
          "connection_history_trigger",
          "connection_history_cursor",
          "places_identity_missing",
          "places_not_permitted",
          "places_unavailable",
          "place_not_found",
          "itc_window_not_gst",
          "itc_window_year_unknown",
          "itc_window_year_future",
          "itc_window_already",
          "return_itc_support_not_gst34",
          "return_itc_support_export_too_many",
          "invoice_selection_stale",
          "invoice_documents_overrun",
          "contract_po_needs_approver",
          "grant_read_only",
          "grant_no_deletes",
          "banking_agent_refused",
          "banking_needs_web_app",
          "proposal_not_pending",
          "proposal_expired",
          "proposal_on_its_desk",
          "proposal_awaits_confirmation",
          "proposal_contract_changed",
          "proposal_declined_recently",
          "proposal_input_invalid",
          "proposal_input_sensitive",
          "operation_not_served_here",
          "undo_group_not_yours",
          "undo_group_closed",
          "test_copy_outbound_off",
          "test_copy_replaced",
          "test_copy_exists",
          "test_copy_of_copy",
          "test_copy_not_found",
          "test_copy_too_large",
          "test_copy_not_switchable",
          "test_copy_busy",
          "test_copy_base_missing",
          "promotion_too_large",
          "promotion_conflicted",
          "promotion_unresolved",
          "outbound_guard_belt",
          "operation_replay_only",
          "invitation_request_reused",
          "undo_group_required",
          "approval_needs_person",
          "operation_audit_facts",
          "model_read_facts_moved",
          "operation_call_timed_out",
          "operation_facts_moved",
          "operation_settling",
          "position_ahead_of_ledger",
          "job_not_started",
          "job_message_unreadable",
          "answer_unreadable",
          "resource_required",
          "consent_request_invalid",
          "two_factor_required",
          "two_factor_not_enrolled",
          "two_factor_code_wrong",
          "two_factor_locked",
          "grant_ledgers_empty",
          "grant_ledger_unavailable",
          "connected_app_not_found",
          "connected_app_already_revoked",
          "connected_apps_off",
          "connected_app_not_verified",
          "consent_incomplete",
          "intercompany_elimination_blocked_future",
          "intercompany_elimination_blocked_not_matched",
          "intercompany_elimination_blocked_currency",
          "intercompany_elimination_blocked_fiscal_year",
          "intercompany_elimination_blocked_not_posted",
          "intercompany_elimination_blocked_not_plain",
          "intercompany_elimination_blocked_open_differs",
          "intercompany_elimination_blocked_nothing_to_eliminate",
          "intercompany_void_needs_reason",
          "slip_copy_document_mismatch",
          "search_source_erased",
          "search_source_not_found",
          "search_source_not_failed",
          "search_query_empty",
          "search_unavailable",
          "redaction_unavailable",
          "parser_unavailable",
          "parser_refused",
          "ocr_unavailable",
          "embedding_unavailable",
          "assistant_rate_limited",
          "assistant_turn_running",
          "assistant_turn_ended",
          "assistant_confirmation_pending",
          "assistant_not_connected",
          "assistant_already_connected",
          "assistant_ticket_invalid",
          "assistant_ticket_expired",
          "assistant_turn_not_found",
          "assistant_model_unavailable",
          "erasure_request",
          "model_named",
          "figure_unread",
          "contact_detail",
          "web_address",
          "citation_unread",
          "ledger_required",
          "grant_ledger_excluded",
          "confirmation_not_yours",
          "program_limit_exceeded",
          "program_halted",
          "request_state_invalid",
          "undo_group_undone",
          "warehouse_not_configured",
          "warehouse_kind_unknown",
          "warehouse_target_invalid",
          "warehouse_destination_cap",
          "warehouse_target_taken",
          "warehouse_not_tested",
          "warehouse_residency_unacknowledged",
          "warehouse_destination_removed",
          "warehouse_wrong_state",
          "warehouse_credential_not_rotatable",
          "warehouse_backfill_running",
          "warehouse_writer_unavailable",
          "warehouse_setup_not_described",
          "job_not_found",
          "job_finished",
          "job_not_resumable",
          "job_already_open",
          "job_cancel_not_allowed",
          "job_cancel_reason_required",
          "job_step_failed",
          "job_stalled",
          "job_seat_revoked",
          "job_grant_revoked",
          "provider_token_refreshing",
          "bulk_operation_class_refused",
          "bulk_operation_not_idempotent",
          "bulk_operation_not_served",
          "bulk_operation_too_large",
          "bulk_operation_item_too_large",
          "bulk_operation_unknown",
          "bulk_operation_not_undoable",
          "job_not_pausable",
          "job_paused",
          "job_not_reinstatable",
          "undo_group_not_undone",
          "undo_outside_batch",
          "restore_only_through_undo",
          "undo_authority_revoked",
          "undo_authority_unknown",
          "record_import_not_found",
          "record_import_not_applying",
          "record_import_seat_narrowed",
          "close_not_ready",
          "chart_import_clash",
          "csv_import_too_many_rows",
          "custom_field_limit_reached",
          "custom_field_index_limit_reached",
          "custom_object_limit_reached",
          "custom_object_archived",
          "custom_key_taken",
          "custom_field_not_indexed",
          "custom_field_index_building",
          "custom_reference_not_found",
          "custom_record_changed",
          "dimension_type_limit_reached",
          "dimension_type_system",
          "validation_rule_limit_reached",
          "validation_rule_invalid",
          "validation_rule_failed",
          "record_labels_too_many",
          "custom_field_type_not_on_lines",
          "custom_field_line_not_indexable",
          "custom_field_print_limit_reached",
          "invalid_custom_field",
          "entry_posted",
          "operation_sunset",
          "idempotency_key_required",
          "api_access_not_enabled",
          "api_access_ledger_closed",
          "api_key_maker_left",
          "workflow_definition_invalid",
          "workflow_action_not_offered",
          "workflow_action_banking",
          "workflow_action_person_only",
          "workflow_proposal_not_last",
          "workflow_limit_reached",
          "workflow_expiry_invalid",
          "workflow_preview_required",
          "workflow_needs_second_admin",
          "workflow_owner_lacks_capability",
          "workflow_version_changed",
          "workflow_activation_needs_person",
          "workflow_not_active",
          "workflow_paused",
          "workflow_expired",
          "workflow_draft_missing",
          "approval_step_same_person",
          "approval_vote_twice",
          "rule_routing_moved",
          "rule_auto_approval_web_only",
          "workflow_run_banking_refused",
          "query_not_a_select",
          "query_multiple_statements",
          "query_syntax",
          "query_view_unknown",
          "query_view_not_permitted",
          "query_function_not_allowed",
          "query_construct_not_allowed",
          "query_duplicate_column",
          "query_too_large",
          "query_too_costly",
          "query_timed_out",
          "query_write_refused",
          "query_busy",
          "query_needs_order_for_paging",
          "query_offset_too_large",
          "query_cursor_mismatch",
          "analysis_scope_tampered",
          "analysis_deparse_mismatch",
          "measure_unknown",
          "dimension_unknown",
          "measure_dimension_unreachable",
          "measure_mixed_currency",
          "measure_point_in_time",
          "saved_query_changed",
          "saved_query_limit_reached",
          "saved_query_archived",
          "dimension_value_merge_type",
          "dimension_value_merge_target_merged",
          "dimension_value_merge_self",
          "dimension_value_has_children",
          "dimension_value_not_merged",
          "dimension_value_already_merged",
          "tenant_moving",
          "tenant_unavailable",
          "inbound_address_taken",
          "inbound_domain_taken",
          "vendor_export_too_many",
          "vendor_name_no_letters",
          "vendor_same_supplier",
          "vendor_default_account_not_on_ledger",
          "terms_not_on_ledger",
          "terms_not_for_purchases",
          "terms_days_no_set",
          "terms_days_ambiguous",
          "vendor_company_not_on_ledger",
          "vendor_owner_not_on_ledger",
          "vendor_counterparty_entity_taken",
          "banking_change_already_open",
          "vendor_second_remittance_contact",
          "vendor_archived_closed",
          "vendor_already_archived",
          "vendor_archive_banking_open",
          "vendor_not_archived",
          "vendor_hold_on_archived",
          "vendor_already_held",
          "vendor_not_held",
          "banking_evidence_not_on_ledger",
          "banking_vendor_archived",
          "banking_account_shared",
          "banking_change_already_decided",
          "banking_change_decided_meanwhile",
          "banking_change_frozen",
          "banking_change_not_in_force",
          "banking_decide_own_proposal",
          "banking_withdraw_not_yours",
          "banking_notice_moved",
          "banking_evidence_too_large",
          "banking_notice_not_owed",
          "banking_notice_already_recorded",
          "vendor_contact_remittance_needs_email",
          "vendor_contact_unreachable",
          "vendor_contact_email_role_taken",
          "vendor_contacts_full",
          "vendor_contact_unchanged",
          "purchases_cursor_unknown",
          "vendor_accept_own",
          "vendor_accept_archived",
          "vendor_already_accepted",
          "vendor_refuse_accepted",
          "vendor_refuse_already_decided",
          "banking_same_hand",
          "purchases_verification_method_not_offered",
          "purchases_payable_account_not_liability",
          "purchases_self_approved_export_too_many",
          "bill_export_too_many",
          "bill_vendor_not_on_ledger",
          "bill_vendor_archived",
          "bill_supplier_unnamed",
          "bill_due_before_bill_date",
          "bill_payable_not_on_chart",
          "bill_payable_not_liability",
          "bill_document_not_on_ledger",
          "bill_document_not_viewable",
          "bill_document_missing",
          "bill_document_stand_in",
          "bill_document_wrong_kind",
          "bill_document_inbox_keeps",
          "bill_lines_no_revisions",
          "bill_revision_unknown",
          "bill_line_price_mismatch",
          "bill_own_work_no_ceiling",
          "bill_own_work_over_ceiling",
          "bill_over_approval_ceiling",
          "bill_submit_blocked",
          "bill_decision_unknown",
          "bill_edit_blocked",
          "bill_import_number_required",
          "bill_import_company_gone",
          "bill_import_finding",
          "bill_import_duplicate",
          "bill_duplicate_stopped",
          "bill_not_found",
          "bill_not_awaiting_decision",
          "bill_decided_from_entry",
          "bill_approval_already_decided",
          "bill_cannot_post",
          "bill_line_uncoded",
          "bill_line_tax_changed",
          "bill_total_changed",
          "bill_draft_save_not_draft",
          "bill_edit_payload_unreadable",
          "bill_edit_not_posted",
          "bill_edit_already_pending",
          "bill_edit_payment_pinned",
          "bill_edit_none_pending",
          "bill_edit_own_proposal",
          "bill_edit_stale",
          "bill_edit_no_entry",
          "bill_legacy_changed",
          "bill_legacy_state",
          "bill_payment_changed",
          "bill_not_payable",
          "bill_changed",
          "bill_submit_not_draft",
          "bill_incomplete",
          "bill_number_used",
          "bill_void_not_posted",
          "bill_already_void",
          "bill_void_payment_blocked",
          "bill_void_edit_pending",
          "bill_void_no_entry",
          "bill_discard_not_draft",
          "payment_account_currency_not_in_file",
          "payment_originator_not_bank",
          "payment_run_export_too_many",
          "payment_date_too_far_ahead",
          "payment_date_too_far_back",
          "payment_run_account_not_company_bank",
          "payment_run_account_no_originator",
          "payment_run_bills_refused",
          "payment_run_bill_taken",
          "payment_run_allocation_moved",
          "payment_run_moved_meanwhile",
          "payment_run_payment_moved",
          "payment_run_release_own",
          "payment_run_not_draft",
          "payment_run_callback_unconfirmed",
          "payment_run_callback_unknown",
          "payment_run_no_rate",
          "payment_run_vendors_not_accepted",
          "payment_run_vendors_held",
          "payment_run_banking_moved",
          "payment_allocation_no_bill",
          "payment_bill_no_longer_owed",
          "payment_bill_entry_moved",
          "payment_bill_payable_lines",
          "payment_bill_payable_differs",
          "payment_run_cannot_cancel",
          "payment_run_cannot_reverse",
          "payment_run_no_entries",
          "payment_run_already_reversed",
          "payment_run_no_file",
          "payment_run_over_ceiling",
          "inbox_read_flag_not_open",
          "inbox_read_not_this_document",
          "inbox_read_already_read",
          "inbox_read_would_not_change",
          "inbox_read_attempts_used",
          "inbox_arrival_invoices_not_ours",
          "inbox_arrival_owned_by_bill",
          "inbox_arrival_at_the_desk",
          "inbox_arrival_already_decided",
          "inbox_arrival_sent_to_reader",
          "inbox_arrival_nothing_to_read",
          "inbox_arrival_type_not_readable",
          "inbox_arrival_already_read",
          "inbox_arrival_still_being_read",
          "inbox_arrivals_export_too_many",
          "inbox_refusals_export_too_many",
          "inbox_documents_export_too_many",
          "inbox_reply_stop_exists",
          "inbox_reply_stop_already_lifted",
          "inbox_replies_address_revoked",
          "inbox_replies_invoices_address",
          "inbox_replies_no_contact",
          "inbox_replies_until_out_of_range",
          "inbox_replies_already_off",
          "inbox_address_export_too_many",
          "inbox_address_mint_collided",
          "inbox_address_already_revoked",
          "inbox_address_vendor_archived",
          "inbox_address_watcher_no_seat",
          "inbox_address_telephone_required",
          "inbox_address_watcher_moved",
          "inbox_address_watcher_unchanged",
          "inbox_address_revoked_final",
          "inbox_address_binding_fixed",
          "inbox_address_invoices_not_bound",
          "inbox_address_suggestion_changed",
          "inbox_address_not_waiting",
          "inbox_address_no_suggestion",
          "vendor_notice_export_too_many",
          "vendor_notice_already_sent",
          "vendor_notice_withheld",
          "vendor_notice_draft_names_nobody",
          "vendor_notice_outbound_not_approved",
          "vendor_notice_recipient_stopped",
          "vendor_notice_recipient_bounced",
          "vendor_notice_relay_refused",
          "vendor_notice_vendor_archived",
          "vendor_notice_vendor_refused",
          "vendor_notice_address_unusable",
          "vendor_notice_recipient_not_on_record",
          "vendor_notice_no_email",
          "vendor_notice_no_contact",
          "vendor_notice_draft_open",
          "vendor_notice_not_drafted",
          "vendor_notice_paragraph_contact_detail",
          "vendor_notice_paragraph_banking",
          "bill_no_authority",
          "bill_outside_authority",
          "bill_authority_expired",
          "payment_run_no_authority",
          "payment_run_outside_authority",
          "payment_run_authority_expired",
          "authority_self_set",
          "authority_not_approver",
          "authority_scope_not_on_ledger",
          "authority_currency_not_company",
          "authority_own_work_above_cap",
          "authority_run_scope",
          "authority_expiry_out_of_range",
          "authority_already_open",
          "authority_closed",
          "authority_nothing_changed",
          "authority_carried_over_none",
          "authority_as_at_future",
          "authority_export_too_many",
          "bill_not_on_your_desk",
          "bill_stage_same_person",
          "bill_desk_not_waiting",
          "bill_desk_reassign_not_yours",
          "bill_desk_reassign_no_seat",
          "bill_desk_reassign_preparer",
          "bill_desk_reassign_no_authority",
          "bill_desk_reassign_same",
          "bill_desk_reassign_reviewer",
          "bill_awaiting_with_view",
          "bill_awaiting_too_many",
          "bill_approval_stage_export_too_many",
          "purchases_substitute_not_yours",
          "purchases_substitute_self",
          "purchases_substitute_no_seat",
          "purchases_substitute_too_long",
          "purchases_substitute_in_past",
          "purchases_substitute_overlap",
          "purchases_substitute_ended",
          "purchases_routing_desk_not_for_entries",
          "purchases_routing_author_no_authority",
          "purchases_policy_preview_needed",
          "purchases_policy_confirm_not_author",
          "purchases_policy_expiry_too_far",
          "purchases_policy_expiry_past",
          "purchases_policy_turn_on_by_confirm",
          "payment_originator_change_open",
          "payment_originator_same_as_in_force",
          "payment_originator_evidence_not_on_ledger",
          "payment_originator_decide_own_proposal",
          "payment_originator_change_already_decided",
          "payment_originator_change_decided_meanwhile",
          "payment_originator_withdraw_not_yours",
          "payment_run_originator_unverified",
          "payment_run_release_not_recorded",
          "bill_own_work_not_recorded",
          "payment_run_file_store_unavailable",
          "payment_run_file_missing",
          "payment_run_file_changed",
          "payment_run_file_stand_in",
          "full_export_own_request",
          "full_export_sole_admin",
          "full_export_override_not_sole",
          "full_export_override_not_owner",
          "full_export_already_decided",
          "full_export_decision_window_passed",
          "full_export_bank_files_not_confirmed",
          "full_export_bank_files_web_only",
          "full_export_not_approved",
          "full_export_not_yours",
          "full_export_already_downloaded",
          "full_export_download_window_passed",
          "full_export_not_requester",
          "full_export_list_too_many",
          "full_export_not_ready",
          "full_export_build_failed",
          "full_export_build_cancelled",
          "signal_already_decided",
          "signal_dismiss_own_work",
          "signal_export_too_many",
          "signal_decided_by_banking_change",
          "banking_signals_changed",
          "banking_reject_signal_not_fired",
          "vendor_sender_domain_already_retired",
          "vendor_sender_domain_not_retired",
          "bill_hold_not_payable",
          "bill_already_held",
          "bill_not_held",
          "bill_hold_until_past",
          "bill_hold_until_too_far",
          "payment_run_bills_held",
          "payment_run_bill_held_meanwhile",
          "bill_settlement_not_owed",
          "bill_settlement_in_draft_run",
          "bill_settlement_amount_moved",
          "bill_settlement_future_date",
          "bill_settlement_account_not_company",
          "bill_settlement_currency",
          "bill_settlement_paid_amount_required",
          "bill_settlement_method_not_recordable",
          "bill_settlement_no_open_period",
          "bill_settlement_payable_lines",
          "bill_settlement_payable_differs",
          "bill_settlement_same_person",
          "bill_settlement_over_ceiling",
          "bill_settlement_held",
          "bill_settlement_not_awaiting",
          "bill_settlement_run_owned",
          "bill_settlement_void_period_closed",
          "bill_paid_by_in_draft",
          "bill_paid_by_closed",
          "bill_paid_by_in_run",
          "bill_paid_by_recorded",
          "bill_still_owed_not_listed",
          "bill_paid_by_at_review",
          "bill_edit_paid_by",
          "purchases_as_of_future",
          "purchases_ageing_too_many_bills",
          "purchases_ageing_export_too_many",
          "purchases_report_unknown",
          "purchases_report_filter_not_taken",
          "purchases_report_status_unknown",
          "purchases_report_needs_company",
          "purchases_report_needs_dimension",
          "purchases_report_needs_slip_kind",
          "purchases_report_no_registration",
          "purchases_report_range_too_long",
          "purchases_report_controls_seat",
          "purchases_report_export_too_many",
          "purchases_report_working_set",
          "purchases_report_view_limit",
          "purchases_report_view_name_taken",
          "payment_run_reversal_not_recorded",
          "purchases_fx_method_recent",
          "bill_fx_not_foreign",
          "bill_fx_not_posted",
          "bill_fx_already_stated",
          "bill_fx_rate_date_future",
          "bill_itc_statement_void",
          "bill_itc_statement_not_claimed",
          "bill_itc_statement_stale",
          "vendor_registration_no_number",
          "vendor_registration_number_changed",
          "vendor_registration_date_future",
          "vendor_registration_evidence_not_found",
          "vendor_registration_evidence_too_large",
          "vendor_registration_evidence_missing",
          "vendor_registration_evidence_stand_in",
          "vendor_registration_state_checked",
          "bill_posting_date_required",
          "bill_posting_date_outside",
          "bill_posting_date_not_moved",
          "bill_posting_no_open_period",
          "bill_posting_date_not_recorded",
          "bill_posting_date_at_review",
          "payment_run_bill_owed_moved",
          "payment_bill_owed_moved",
          "bill_settlement_more_than_owed",
          "bill_settlement_short_without_reason",
          "vendor_credit_not_draft",
          "vendor_credit_no_vendor",
          "vendor_credit_incomplete",
          "vendor_credit_nothing_credited",
          "vendor_credit_number_used",
          "vendor_credit_date_future",
          "vendor_credit_vendor_archived",
          "vendor_credit_not_in_review",
          "vendor_credit_same_person",
          "vendor_credit_pricing_moved",
          "vendor_credit_posting_date_required",
          "vendor_credit_posting_date_outside",
          "vendor_credit_posting_date_not_moved",
          "vendor_credit_no_open_period",
          "vendor_credit_not_open",
          "vendor_credit_bill_other_vendor",
          "vendor_credit_bill_other_company",
          "vendor_credit_bill_currency",
          "vendor_credit_bill_not_owing",
          "vendor_credit_bill_in_draft_run",
          "vendor_credit_payable_differs",
          "vendor_credit_bill_over_open",
          "vendor_credit_over_remaining",
          "vendor_credit_already_applied",
          "vendor_credit_exchange_account_missing",
          "vendor_credit_application_in_run",
          "vendor_credit_application_not_live",
          "vendor_credit_not_approved",
          "vendor_credit_has_applications",
          "vendor_credit_has_refunds",
          "vendor_credit_refund_future_date",
          "vendor_credit_refund_account_not_company",
          "vendor_credit_refund_amount_required",
          "vendor_credit_refund_over_remaining",
          "vendor_credit_refund_not_awaiting",
          "vendor_credit_refund_not_standing",
          "vendor_credit_refund_same_person",
          "vendor_credit_export_too_many",
          "payment_run_credit_not_open",
          "payment_run_credit_other_vendor",
          "payment_run_credit_over_open",
          "payment_run_credit_covers_bill",
          "bill_supersede_not_draft",
          "bill_supersede_self",
          "bill_supersede_target_unknown",
          "bill_supersede_target_draft",
          "bill_supersede_other_company",
          "bill_supersede_no_vendor",
          "bill_supersede_other_vendor",
          "bill_supersede_taken",
          "bill_supersede_already_linked",
          "bill_supersede_not_linked",
          "bill_supersede_first_stands",
          "bill_supersede_flag_settled",
          "bill_supersede_flag_not_this",
          "payment_run_cheque_number_required",
          "payment_run_cheque_number_not_asked",
          "payment_run_cheque_number_range",
          "payment_run_cheque_number_taken",
          "payment_run_register_not_cheque",
          "payment_run_register_not_released",
          "bill_settlement_line_not_a_candidate",
          "bill_settlement_line_declined",
          "bill_settlement_feed_score_moved",
          "bill_settlement_line_taken",
          "bill_settlement_line_certified",
          "bill_feed_line_not_a_candidate",
          "payment_discount_changed",
          "payment_discount_window_closed",
          "payment_discount_account_type",
          "payment_run_remove_not_draft",
          "payment_run_remove_last",
          "payment_run_payment_already_removed",
          "payment_reverse_not_released",
          "payment_removed_never_posted",
          "payment_already_reversed",
          "payment_reverse_file_rejected",
          "payment_return_date_invalid",
          "payment_run_notice_document_invalid",
          "payment_run_lodgement_not_released",
          "payment_run_lodgement_recorded",
          "payment_run_lodgement_reversed",
          "payment_run_lodgement_date_invalid",
          "payment_run_outcome_not_lodged",
          "payment_run_outcome_recorded",
          "payment_run_outcome_accepted_reversed",
          "payment_run_outcome_after_return",
          "payment_run_outcome_date_invalid",
          "payment_run_banking_returned",
          "payment_run_banking_returned_meanwhile",
          "payment_run_totals_not_recorded",
          "payment_run_lodgement_cheque",
          "payment_run_bills_twin_paid",
          "bill_settlement_line_not_a_bill",
          "bill_settlement_line_amount_differs",
          "payment_run_clearing_disagrees",
          "payment_bank_profile_no_originator",
          "payment_bank_profile_exists",
          "payment_bank_profile_uncited",
          "payment_bank_profile_changed",
          "payment_run_test_not_draft",
          "payment_run_test_no_profile",
          "payment_run_test_check_failed",
          "payment_bank_file_verdict_recorded",
          "payment_bank_file_verdict_no_evidence",
          "payment_bank_file_evidence_not_on_ledger",
          "payment_bank_file_tests_export_too_many",
          "payment_run_bank_file_unproved",
          "payment_run_bank_date_window",
          "payment_run_bank_currency_refused",
          "payment_run_test_not_eft",
          "vendor_notice_remittance_run_not_released",
          "vendor_notice_remittance_not_sender",
          "vendor_notice_remittance_needs_second_person",
          "vendor_notice_remittance_new_address_needs_person",
          "vendor_notice_remittance_confirm_not_new",
          "vendor_notice_remittance_exists",
          "vendor_notice_remittance_payment_reversed",
          "vendor_notice_remittance_from_run",
          "vendor_notice_remittance_paragraph_contact_detail",
          "vendor_notice_remittance_paragraph_banking",
          "vendor_notice_remittance_paragraph_promise",
          "vendor_notice_bill_no_supplier",
          "vendor_notice_decision_not_made",
          "vendor_notice_no_supplier_contact",
          "vendor_notice_supplier_contact_no_seat",
          "vendor_notice_decision_draft_open",
          "vendor_notice_already_told",
          "vendor_notice_nothing_to_ask",
          "vendor_notice_words_decision",
          "vendor_notice_words_contact_detail",
          "vendor_notice_words_banking",
          "vendor_notice_banking_no_earlier_contact",
          "vendor_notice_recipient_after_change",
          "vendor_notice_not_person_drafted",
          "inbox_address_closing_out_of_range",
          "inbox_address_closing_scheduled",
          "inbox_address_closing_not_scheduled",
          "inbox_address_successor_unusable",
          "purchases_supplier_contact_no_seat",
          "inbox_address_closing_not_announced",
          "vendor_notice_supplier_contact_bills_address",
          "inbox_arrival_owned_by_credit",
          "vendor_credit_refund_currency",
          "vendor_credit_line_other_bill",
          "bill_settlement_evidence_unreadable",
          "bill_feed_line_no_supplier",
          "payment_run_bank_notice_too_large",
          "payment_run_wire_abroad_unreadable",
          "bill_supersede_prefill_too_many_lines",
          "bill_supersede_prefill_no_lines",
          "vendor_document_not_paper",
          "vendor_document_already_filed",
          "vendor_document_title",
          "vendor_document_dates",
          "vendor_document_expiry_too_far",
          "vendor_document_replaces_other_kind",
          "vendor_document_already_replaced",
          "vendor_document_already_withdrawn",
          "vendor_document_waiver_in_force",
          "vendor_document_without_terms_kind",
          "vendor_paper_cap",
          "vendor_paper_file_missing",
          "vendor_paper_file_stand_in",
          "vendor_agreement_term",
          "vendor_agreement_dates",
          "vendor_agreement_notice",
          "vendor_agreement_committed",
          "vendor_agreement_copy_not_theirs",
          "vendor_agreement_already_renewed",
          "vendor_agreement_not_your_decision",
          "vendor_agreement_closed",
          "vendor_paper_notice_no_recipient",
          "vendor_paper_notice_nothing_to_ask",
          "vendor_paper_notice_open_draft",
          "vendor_paper_notice_not_deciding_to_end",
          "vendor_paper_notice_needs_agreement",
          "vendor_paper_notice_names_no_agreement",
          "paper_requirements_count_moved",
          "paper_requirements_too_many",
          "paper_requirements_no_kind",
          "vendor_alias_key_taken",
          "vendor_alias_is_own_name",
          "vendor_alias_limit",
          "vendor_merged_not_restorable",
          "vendor_link_changed",
          "vendor_link_posted_needs_approver",
          "vendor_link_nothing",
          "vendor_merge_same_record",
          "vendor_merge_absorbed_archived",
          "vendor_merge_survivor_archived",
          "vendor_merge_absorbed_refused",
          "vendor_merge_survivor_refused",
          "vendor_merge_banking_open",
          "vendor_merge_banking_differs",
          "vendor_merge_hold_would_lift",
          "vendor_merge_in_draft_run",
          "vendor_merge_bills_in_review",
          "vendor_merge_open_credit",
          "vendor_merge_authority_scope",
          "vendor_merge_counterparty",
          "vendor_merge_slip_kind_differs",
          "vendor_merge_residency_differs",
          "vendor_merge_slip_consent_both_live",
          "vendor_merge_paper_over_cap",
          "vendor_merge_already_open",
          "vendor_merge_survivor_is_absorbed",
          "vendor_merge_same_hand",
          "vendor_merge_expired",
          "vendor_merge_decided",
          "vendor_merge_changed",
          "vendor_merge_withdraw_not_proposer",
          "vendor_merge_export_too_many",
          "vendor_merge_suggestion_dismissed",
          "vendor_merge_suggestion_reinstated",
          "bill_vendor_merged",
          "bill_link_vendor_in_review",
          "bill_link_vendor_void",
          "bill_link_vendor_posted_has_vendor",
          "supplier_match_decided",
          "bill_supplier_match_other_supplier",
          "slip_copies_file_not_kept",
          "slip_copies_print_too_many",
          "slip_copies_print_none",
          "slip_copy_document_not_stored",
          "slip_copy_export_too_many",
          "slip_copies_mailed_set_changed",
          "slip_copies_mailed_not_waiting",
          "slip_copies_mailed_future",
          "slip_consent_no_email",
          "slip_consent_already_live",
          "slip_consent_future",
          "slip_consent_not_given",
          "slip_copy_email_no_consent",
          "slip_copy_from_copies",
          "slip_copy_notice_by_hand",
          "slip_identity_ask_nothing_missing",
          "slip_identity_ask_recent",
          "bill_withholding_status",
          "bill_withholding_vendor_residency",
          "bill_withholding_withheld_on",
          "bill_withholding_changed",
          "bill_withholding_line_not_current",
          "bill_withholding_line_not_service",
          "bill_withholding_whole_bill_has_lines",
          "withholding_waiver_vendor",
          "withholding_waiver_document",
          "withholding_waiver_company",
          "withholding_waiver_already_recorded",
          "withholding_waiver_already_ended",
          "withholding_waiver_end_date",
          "purchases_withholding_account_not_liability",
          "vendor_slip_non_resident",
          "vendor_residency_has_nr_slip",
          "payment_withholding_moved",
          "payment_withholding_account_moved",
          "inbox_controls_sender_above_address",
          "inbox_arrival_held",
          "inbox_hold_not_held",
          "inbox_controls_export_too_many",
          "inbox_controls_firings_filters",
          "payment_run_marks_unconfirmed",
          "payment_run_marks_unknown",
          "payment_run_marks_not_recorded",
          "payment_run_brief_not_draft",
          "bill_dimension_value_unknown",
          "bill_proposed_tag_not_on_line",
          "bill_dimension_not_recorded",
          "bill_budget_changed",
          "bill_budget_not_open",
          "seat_company_outside",
          "seat_company_all_needed",
          "seat_company_person_not_covering",
          "seat_company_policy_wide",
          "seat_company_unclassified",
          "seat_company_report_needs_one",
          "seat_company_not_on_ledger",
          "seat_company_ledger_mismatch",
          "purchase_order_not_found",
          "purchase_order_not_draft",
          "purchase_order_empty_patch",
          "purchase_order_incomplete",
          "purchase_order_vendor_unusable",
          "purchase_order_asked_not_covered",
          "purchase_order_fx_no_rate",
          "purchase_order_fx_not_foreign",
          "purchase_order_dimension_misfiled",
          "purchase_order_awaiting_with_status",
          "purchase_order_changed",
          "purchase_order_not_in_approval",
          "purchase_order_no_authority",
          "purchase_order_outside_authority",
          "purchase_order_authority_expired",
          "purchase_order_over_approval_ceiling",
          "purchase_order_own_work_no_ceiling",
          "purchase_order_cannot_take_back",
          "purchase_order_take_back_seat",
          "purchase_order_notice_open",
          "purchase_order_not_sent",
          "purchase_order_cancel_seat",
          "purchase_order_cancelled",
          "purchase_order_not_approved_to_send",
          "purchase_order_already_sent",
          "purchase_order_no_recipient",
          "purchase_order_recipient_unknown",
          "purchase_order_not_cancelled",
          "purchase_order_series_next_lower",
          "purchase_order_export_too_many",
          "purchase_order_quote_document_not_quote",
          "purchase_order_suggestion_gone",
          "goods_receipt_not_found",
          "purchase_order_not_receivable",
          "goods_receipt_incomplete",
          "goods_receipt_over_receipt",
          "goods_receipt_future_date",
          "goods_receipt_before_order",
          "goods_receipt_receiver_is_approver",
          "goods_receipt_service_requester_only",
          "goods_receipt_on_behalf_seat",
          "goods_receipt_on_behalf_note",
          "goods_receipt_order_changed",
          "goods_receipt_not_proposed",
          "goods_receipt_not_confirmed",
          "goods_receipt_void_seat",
          "goods_receipt_billed",
          "goods_receipt_evidence_limit",
          "goods_receipt_evidence_kind",
          "goods_receipt_evidence_not_attached",
          "goods_receipt_attach_not_live",
          "goods_receipt_withdraw_seat",
          "purchase_order_cancel_after_receipt",
          "purchase_order_amend_after_receipt",
          "purchase_order_cannot_close",
          "purchase_order_close_seat",
          "purchase_order_not_closed",
          "bill_order_link_not_open",
          "bill_order_line_wrong_company",
          "bill_order_line_wrong_supplier",
          "bill_order_line_not_open",
          "bill_order_link_not_recorded",
          "bill_order_link_no_line",
          "bill_order_link_duplicate_line",
          "bill_order_proposal_cleared_line",
          "bill_order_proposal_no_supplier",
          "bill_match_changed",
          "purchases_policy_tolerance_over_authority",
          "vendor_order_exemption_reason_required",
          "accrual_account_missing",
          "accrual_account_not_liability",
          "accrual_account_is_payable",
          "accrual_period_locked",
          "accrual_earlier_standing",
          "accrual_nothing_to_accrue",
          "accrual_standing_differs",
          "accrual_rate_missing",
          "accrual_too_many_lines",
          "expected_bills_month_in_future",
          "expected_bills_export_too_many",
          "accrual_no_signals",
          "accrual_bill_arrived",
          "accrual_already_drafted",
          "accrual_not_predicted",
          "schedule_follow_not_posted",
          "schedule_follow_other_schedule",
          "schedule_follow_inactive",
          "signal_scope_not_offered",
          "bill_prepaid_changed",
          "bill_prepaid_choice_missing",
          "bill_prepaid_not_open",
          "bill_prepaid_released",
          "bill_prepaid_line_locked",
          "prepaid_release_waiting",
          "prepaid_nothing_to_end",
          "prepaid_period_closed",
          "prepaid_not_active",
          "prepaid_destination_refused",
          "prepaid_account_type",
          "bill_holdback_too_large",
          "bill_holdback_amount_invalid",
          "bill_holdback_foreign_currency",
          "bill_holdback_account_missing",
          "bill_holdback_account_not_liability",
          "bill_holdback_account_is_payable",
          "bill_holdback_release_not_posted",
          "bill_holdback_release_exceeds",
          "bill_holdback_release_none_left",
          "bill_holdback_release_before_bill",
          "bill_holdback_release_future",
          "bill_holdback_edit_released",
          "bill_holdback_void_released",
          "bill_holdback_none_note_short",
          "purchases_settings_account_shared",
          "cutover_exists",
          "cutover_date_future",
          "cutover_date_before_incorporation",
          "cutover_suspense_type",
          "cutover_suspense_inactive",
          "cutover_suspense_is_payable",
          "cutover_go_live_documents",
          "cutover_go_live_owned",
          "cutover_settled_frozen",
          "cutover_already_settled",
          "cutover_withdrawn",
          "cutover_withdraw_date_moved",
          "cutover_withdraw_opening_entry",
          "cutover_opening_entry_company",
          "cutover_opening_entry_date",
          "cutover_opening_entry_status",
          "cutover_checks_failing",
          "cutover_checks_changed",
          "cutover_acknowledgement_unknown",
          "cutover_export_too_many",
          "open_payables_cutover_closed",
          "open_payables_wrong_company",
          "open_payables_uploader_posts",
          "open_payables_attestation_missing",
          "open_payables_rows_not_ready",
          "open_payables_count_changed",
          "open_payables_difference_unexplained",
          "open_payables_authority",
          "open_payables_period_locked",
          "open_payables_reverse_closed",
          "open_payables_already_reversed",
          "open_payables_reverse_blocked",
          "open_payables_bill_not_editable",
          "open_payables_bill_void_closed",
          "open_payables_cutover_has_postings",
          "parallel_run_payables_month_not_ended",
          "parallel_run_payables_not_addable",
          "parallel_run_payables_not_compared",
          "parallel_run_proposal_decided",
          "parallel_run_proposal_stale",
          "parallel_run_total_not_classified",
          "parallel_run_proposal_not_found",
          "parallel_run_month_past_line_ceiling",
          "banking_batch_not_yours",
          "banking_batch_file_format",
          "banking_batch_too_many",
          "banking_batch_secret_fill",
          "banking_batch_paper_limit",
          "banking_batch_paper_duplicate",
          "banking_batch_paper_closed",
          "banking_batch_check_nothing",
          "banking_batch_check_running",
          "banking_batch_filter_kind",
          "banking_batch_expired",
          "banking_batch_still_reading",
          "banking_paper_name_empty",
          "banking_paper_taken_off",
          "bill_payable_account_not_recorded",
          "payment_run_release_totals_not_recorded",
          "record_import_apply_running",
          "record_import_too_many_to_approve",
          "record_import_revert_refused",
          "record_import_revert_asset_standing",
          "record_import_revert_customer_waiting",
          "record_import_kind_web_only",
          "payment_run_release_timed_out",
          "list_sort_unknown",
          "list_sort_needs_company",
          "list_sort_unavailable",
          "bill_amount_needs_company",
          "purchases_cursor_other_order",
          "list_view_limit",
          "list_view_shared_limit",
          "list_view_name_taken",
          "list_view_params_not_taken",
          "list_view_share_needs_seat",
          "bulk_act_empty",
          "bulk_act_too_many",
          "bulk_act_reason_needed",
          "bulk_act_filter_not_taken",
          "bulk_act_filter_changed",
          "bulk_act_changed",
          "bulk_act_over_cap",
          "bulk_act_nothing_eligible",
          "bulk_act_wrong_mode",
          "bulk_item_not_found",
          "bulk_item_status",
          "bill_bulk_stage_is_review",
          "bill_bulk_no_rate",
          "bill_bulk_month_closed",
          "bill_bulk_over_budget",
          "bill_bulk_match_exception",
          "bill_bulk_prepaid_offered",
          "bill_bulk_findings",
          "bill_bulk_signal_open",
          "bill_bulk_not_draft",
          "bill_bulk_not_held",
          "vendor_bulk_already_held",
          "vendor_bulk_not_held",
          "payment_run_bulk_not_draft",
          "purchase_order_bulk_not_draft",
          "inbox_bulk_already_decided",
          "purchases_export_kind_unknown",
          "purchases_export_query_invalid",
          "purchases_export_open_limit",
          "purchases_export_all_needs_audit",
          "purchases_export_not_ready",
          "purchases_export_failed",
          "purchases_export_expired",
          "purchases_export_not_yours",
          "purchases_export_seat_changed",
          "purchases_export_object_missing",
          "privacy_received_out_of_range",
          "privacy_identity_note_needed",
          "privacy_not_an_individual",
          "privacy_duplicate_open",
          "privacy_change_in_force",
          "privacy_change_in_draft_run",
          "privacy_change_not_paid",
          "privacy_digits_already_destroyed",
          "privacy_permission_needed",
          "privacy_permission_voided",
          "privacy_permission_other_supplier",
          "privacy_permission_duplicate",
          "privacy_permission_used",
          "privacy_own_request",
          "privacy_not_waiting",
          "privacy_not_open",
          "privacy_plan_moved",
          "privacy_not_yours",
          "privacy_answer_before_decision",
          "privacy_already_answered",
          "privacy_pack_not_for_this_kind",
          "privacy_pack_not_asked",
          "privacy_pack_not_ready",
          "privacy_pack_build_failed",
          "privacy_pack_build_cancelled",
          "privacy_pack_gone",
          "privacy_admin_only",
          "privacy_message_too_long",
          "privacy_no_decision_for_copy",
          "privacy_export_too_many",
          "privacy_permission_letter_wrong_kind",
          "vendor_merge_privacy_request_open",
          "vendor_merge_portal_submission_waiting",
          "vendor_merge_vendor_query_open",
          "vendor_merge_vendor_statement_open",
          "year_end_file_year_end_invalid",
          "year_end_file_building",
          "year_end_file_not_building",
          "year_end_file_not_ready",
          "year_end_file_already_signed",
          "year_end_file_store_unavailable",
          "year_end_file_audit_seat",
          "year_end_file_commentary_figure",
          "year_end_file_decisions_incomplete",
          "year_end_commentary_attempts",
          "year_end_file_export_too_many",
          "vendor_portal_off",
          "vendor_portal_link_revoked",
          "vendor_portal_no_live_link",
          "vendor_portal_issuer_deciding",
          "vendor_portal_already_decided",
          "vendor_portal_record_moved",
          "vendor_portal_submission_kind",
          "vendor_portal_evidence_mismatch",
          "vendor_portal_closed",
          "vendor_portal_facts_empty",
          "vendor_portal_facts_waiting",
          "vendor_portal_banking_waiting",
          "vendor_portal_digits_not_here",
          "vendor_portal_paper_kind",
          "vendor_portal_cap",
          "vendor_portal_daily_limit",
          "vendor_portal_no_company",
          "vendor_portal_file_too_large",
          "vendor_portal_file_empty",
          "vendor_portal_file_type",
          "vendor_portal_file_not_kept",
          "vendor_portal_not_withdrawable",
          "vendor_portal_link_mismatch",
          "vendor_query_closed",
          "vendor_query_moved_on",
          "vendor_query_already_resolved",
          "vendor_query_owner_no_seat",
          "vendor_query_assign_not_yours",
          "vendor_query_subject_other_supplier",
          "vendor_query_vendor_archived",
          "vendor_query_arrival_not_a_message",
          "vendor_query_arrival_already_opened",
          "vendor_query_arrival_supplier_needed",
          "vendor_query_fact_not_available",
          "vendor_query_answer_empty",
          "vendor_notice_invitation_needs_link",
          "vendor_notice_link_not_invitation",
          "vendor_portal_company_needed",
          "vendor_portal_owner_unavailable",
          "vendor_portal_query_closed",
          "vendor_query_arrival_text_unreadable",
          "vendor_query_policy_expires_past",
          "vendor_query_no_company_reachable",
          "vendor_query_message_other_supplier",
          "vendor_query_arrival_quoted_only",
          "vendor_query_internal_question_not_open",
          "vendor_statement_database_refused",
          "vendor_query_portal_duplicate",
          "vendor_query_portal_open_cap",
          "vendor_query_portal_message_cap",
          "vendor_query_policy_expiry",
          "vendor_query_policy_ended",
          "vendor_query_export_too_many",
          "vendor_query_set_aside_origin",
          "vendor_query_follow_up_open",
          "vendor_statement_not_found",
          "vendor_statement_exists",
          "vendor_statement_document_used",
          "vendor_statement_file_format",
          "vendor_statement_file_too_large",
          "vendor_statement_missing_date",
          "vendor_statement_too_many_lines",
          "vendor_statement_not_in_review",
          "vendor_statement_changed",
          "vendor_statement_books_moved",
          "vendor_statement_no_supplier",
          "vendor_statement_supplier_differs",
          "vendor_statement_unchecked_figures",
          "vendor_statement_missing_header",
          "vendor_statement_too_many_bills",
          "vendor_statement_link_invalid",
          "vendor_statement_decline_reason",
          "vendor_statement_read_in_progress",
          "vendor_statement_read_attempts_used",
          "vendor_statement_nothing_to_read",
          "vendor_statement_not_accepted",
          "vendor_statement_nothing_to_ask",
          "vendor_statement_discard_seat",
          "vendor_account_statement_not_tied",
          "vendor_account_statement_too_many_rows",
          "vendor_account_statement_too_many_to_draw",
          "bill_question_topic_open",
          "bill_question_bill_void",
          "bill_question_outcome_required",
          "bill_question_outcome_bill_only",
          "ai_ceiling_not_whole_cents",
          "ai_ceiling_too_high",
          "ai_ceiling_below_budget",
          "ai_budget_above_ledger",
          "ai_use_cursor_invalid",
          "ai_use_range_too_long",
          "ai_use_export_too_many",
          "bill_capital_bill_not_posted",
          "bill_capital_line_not_capital",
          "bill_capital_set_aside",
          "bill_capital_over_line",
          "bill_capital_entity_differs",
          "bill_capital_account_differs",
          "bill_capital_changed",
          "bill_capital_line_locked",
          "bill_capital_void_blocked",
          "bill_capital_read_off",
          "bill_capital_read_attempts_used",
          "bill_capital_read_not_open",
          "bill_capital_asset_already_linked",
          "bill_capital_asset_mismatch",
          "bill_capital_look_back_future",
          "signal_capital_set_aside_own_work",
          "signal_confirmed_by_registration",
          "purchases_line_profile_too_few_bills",
          "purchases_line_profile_field_not_agreed",
          "purchases_line_profile_pattern_moved",
          "purchases_line_profile_one_live",
          "purchases_line_profile_replaces_nothing",
          "purchases_line_profile_not_typed",
          "purchases_line_profile_account_not_active",
          "bill_plan_not_open",
          "bill_plan_date_past",
          "bill_plan_date_far",
          "bill_due_account_needs_company",
          "bill_due_account_invalid",
          "bulk_act_needs_date",
          "payment_plan_account_invalid",
          "payment_plan_vendor_unknown",
          "payment_plan_window_invalid",
          "payment_plan_nothing_to_plan",
          "payment_plan_expired",
          "payment_plan_already_decided",
          "payment_plan_changed",
          "payment_plan_line_unknown",
          "payment_plan_lines_open",
          "payment_plan_not_recorded",
          "payment_run_release_policy_author",
          "run_policy_account_taken",
          "run_policy_expiry_too_far",
          "run_policy_currency_differs",
          "run_policy_not_in_force",
          "run_policy_decline_needed",
          "run_policy_decline_suggestion",
          "run_policy_replace_invalid",
          "month_end_commentary_month_invalid",
          "month_end_commentary_draft_exists",
          "month_end_commentary_replaced",
          "month_end_commentary_race",
          "month_end_commentary_read_failed",
          "month_end_commentary_database_refused",
          "month_end_commentary_not_draft",
          "month_end_commentary_audit_seat",
          "month_end_commentary_sentence_figure",
          "month_end_commentary_decisions_incomplete",
          "month_end_commentary_nothing_kept",
          "month_end_commentary_attempts",
          "month_end_commentary_export_too_many",
          "imported_history_suppliers_unplaced",
          "imported_history_suppliers_not_offered",
          "migration_file_not_readable",
          "migration_file_wrong_kind",
          "migration_no_open_payables",
          "migration_too_many_files",
          "migration_reading_too_many",
          "migration_banking_needs_sensitive",
          "migration_month_signed",
          "migration_month_no_payables",
          "migration_month_company",
          "migration_month_before_conversion",
          "migration_assistant_not_for_lens",
          "migration_finding_decided",
          "migration_finding_not_proposal",
          "migration_finding_stale",
          "migration_class_not_allowed",
          "migration_change_needs",
          "migration_export_too_many",
          "webhook_signing_not_configured",
          "webhook_url_invalid",
          "webhook_url_not_https",
          "webhook_url_private",
          "webhook_url_has_query",
          "webhook_url_has_credentials",
          "webhook_url_port",
          "webhook_url_duplicate",
          "webhook_endpoint_limit",
          "webhook_event_unknown",
          "webhook_endpoint_not_active",
          "webhook_endpoint_removed",
          "webhook_secret_already_shown",
          "webhook_delivery_not_dead",
          "webhook_test_too_soon",
          "webhook_export_too_many",
          "card_receipt_export_too_many",
          "bill_also_record_needs_card",
          "bill_seen_total_changed",
          "bill_vendor_is_own_company",
          "vendor_counterparty_has_bills",
          "vendor_merge_counterparty_own_bills",
          "intercompany_other_company_not_in_seat",
          "intercompany_pair_decided",
          "intercompany_pair_not_open",
          "intercompany_candidate_taken",
          "intercompany_candidate_not_eligible",
          "intercompany_unlink_has_elimination",
          "intercompany_customer_needs_approval",
          "intercompany_customer_company_taken",
          "intercompany_mirror_line_not_billable",
          "intercompany_mirror_too_many_lines",
          "intercompany_account_not_revenue",
          "intercompany_figures_moved",
          "intercompany_decline_needs_reason",
          "intercompany_elimination_exists",
          "intercompany_elimination_already_void",
          "intercompany_by_hand_not_needed",
          "intercompany_by_hand_needs_note",
          "intercompany_elimination_groups_differ",
          "intercompany_reading_off",
          "intercompany_reading_limit",
          "intercompany_export_too_many",
          "intercompany_look_back_company_required",
          "inbox_domain_apex",
          "inbox_domain_platform",
          "inbox_domain_malformed",
          "inbox_domain_company_has_one",
          "inbox_domain_taken",
          "inbox_domain_unavailable",
          "inbox_domain_not_verified",
          "inbox_domain_local_part_reserved",
          "inbox_domain_address_taken",
          "inbox_domain_invoices_mailbox",
          "inbox_domain_company_mismatch",
          "inbox_domain_removed_final",
          "payment_rail_not_approved",
          "payment_rail_not_configured",
          "payment_rail_off",
          "payment_rail_no_connection",
          "payment_rail_connection_unavailable",
          "payment_rail_provider_unavailable",
          "payment_rail_funding_source_refused",
          "payment_rail_funding_source_in_use",
          "payment_rail_funding_source_not_bound",
          "payment_rail_already_set",
          "payment_rail_run_not_released",
          "payment_rail_method",
          "payment_rail_currency",
          "payment_rail_run_lodged",
          "payment_rail_already_dispatched",
          "payment_rail_run_reversed",
          "payment_rail_run_moved",
          "payment_rail_confirmation_needed",
          "payment_rail_run_changed",
          "payment_rail_nothing_to_send",
          "payment_rail_nothing_to_stop",
          "payment_rail_sending_now",
          "payment_rail_outcome_unknown",
          "payment_rail_payees_not_payable",
          "payment_rail_in_flight",
          "payment_run_lodgement_dispatched",
          "payment_return_file_invalid",
          "payment_return_file_duplicate",
          "payment_return_file_not_a_notice",
          "payment_return_run_not_released",
          "payment_return_run_not_eft",
          "payment_return_proposal_decided",
          "payment_run_outcome_with_open_returns",
          "vendor_query_arrival_changed",
          "vendor_statement_file_missing",
          "purchases_custom_field_values_bill_void",
          "purchases_custom_field_values_kind_unknown",
          "vendor_reopen_archived",
          "vendor_reopen_nothing_to_reopen",
          "vendor_reopen_decided_again",
          "vendor_restore_moved_on",
          "vendor_registration_check_replaced",
          "vendor_registration_stated_changed",
          "vendor_registration_earlier_check_unusable",
          "vendor_credit_moved_on",
          "payment_run_policy_pass_not_run",
          "payment_run_policy_pass_run_moved",
          "vendor_line_profile_not_proposal",
          "vendor_line_profile_not_dismissed",
          "vendor_line_profile_not_restorable",
          "vendor_line_profile_was_discarded_proposal",
          "inbox_suggestion_decline_moved_on",
          "bill_still_owed_moved_on",
          "bill_feed_decline_moved_on",
          "bill_submission_moved_on",
          "bill_prepaid_early_end_moved_on"
        ],
        "description": "The values listed in `x-extensible-enum` are the ones known today. New values can appear without a new release, so handle an unknown one as you would an unexpected state, not as a failure to parse."
      },
      "CreateBudgetResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "fiscalYear": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "fiscalYearEndMonth": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 12
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "approved": {
            "type": "boolean"
          },
          "approvedByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "approvedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "accountId": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "periodYear": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "periodMonth": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 12
                },
                "amountMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                }
              },
              "required": [
                "accountId",
                "code",
                "name",
                "periodYear",
                "periodMonth",
                "amountMinor"
              ],
              "additionalProperties": false
            }
          },
          "totalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "name",
          "fiscalYear",
          "fiscalYearEndMonth",
          "currency",
          "version",
          "approved",
          "approvedByName",
          "approvedAt",
          "createdByName",
          "createdAt",
          "lines",
          "totalMinor"
        ],
        "additionalProperties": false
      },
      "CreateChartImportResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "QBO",
              "SAGE50",
              "GENERIC"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "REVIEW",
              "APPROVED"
            ]
          },
          "rowCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "groupCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "skippedCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "uploadedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "approvedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "approvedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "accountsCreated": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "dimensionValuesCreated": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "dimensionPoliciesCreated": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "declinedGroups": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "base": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "ASSET",
                    "LIABILITY",
                    "EQUITY",
                    "REVENUE",
                    "EXPENSE"
                  ]
                },
                "gifiCode": {
                  "type": "string"
                },
                "gifiConfidence": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "members": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "lineNumber": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "code": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "suffix": {
                        "type": "string"
                      },
                      "dimensionValueCode": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "lineNumber",
                      "code",
                      "name",
                      "suffix",
                      "dimensionValueCode"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "key",
                "base",
                "code",
                "type",
                "gifiCode",
                "gifiConfidence",
                "members"
              ],
              "additionalProperties": false
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lineNumber": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "structure": {
                  "type": "string"
                }
              },
              "required": [
                "lineNumber",
                "code",
                "name",
                "structure"
              ],
              "additionalProperties": false
            }
          },
          "rows": {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "lineNumber": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "ASSET",
                        "LIABILITY",
                        "EQUITY",
                        "REVENUE",
                        "EXPENSE"
                      ]
                    },
                    "suppliedGifi": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "suggestedGifi": {
                      "type": "string"
                    },
                    "suggestedGifiConfidence": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "suggestedGifiBasis": {
                      "type": "string"
                    },
                    "parentCode": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "groupKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "groupSuffix": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "lineNumber",
                    "code",
                    "name",
                    "type",
                    "suppliedGifi",
                    "suggestedGifi",
                    "suggestedGifiConfidence",
                    "suggestedGifiBasis",
                    "parentCode",
                    "groupKey",
                    "groupSuffix"
                  ],
                  "additionalProperties": false
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "total": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "data",
              "nextCursor",
              "total"
            ],
            "additionalProperties": false
          },
          "suggestedCodeCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "fileName",
          "format",
          "status",
          "rowCount",
          "groupCount",
          "skippedCount",
          "uploadedBy",
          "createdAt",
          "approvedBy",
          "approvedAt",
          "accountsCreated",
          "dimensionValuesCreated",
          "dimensionPoliciesCreated",
          "declinedGroups",
          "groups",
          "skipped",
          "rows",
          "suggestedCodeCount"
        ],
        "additionalProperties": false
      },
      "CreateDimensionTypeResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "isSystem": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "values": {
            "$ref": "#/components/schemas/Values"
          }
        },
        "required": [
          "id",
          "code",
          "label",
          "description",
          "isSystem",
          "active",
          "sortOrder",
          "values"
        ],
        "additionalProperties": false
      },
      "CustomFields": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]{0,39}$"
        },
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 500
            },
            {
              "type": "boolean"
            },
            {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 80
              }
            }
          ]
        }
      },
      "Differences2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "netMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "taxMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "totalMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              }
            },
            "required": [
              "netMinor",
              "taxMinor",
              "totalMinor"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "DifferencesByClass": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "class": {
              "type": "string",
              "enum": [
                "TIMING",
                "CLASSIFICATION",
                "TAX_TREATMENT",
                "MISSING_SOURCE",
                "OUR_DEFECT",
                "THEIR_DEFECT",
                "UNEXPLAINED"
              ]
            },
            "count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "class",
            "count"
          ],
          "additionalProperties": false
        }
      },
      "DimensionsItem": {
        "type": "object",
        "properties": {
          "dimensionTypeId": {
            "type": "string",
            "minLength": 1
          },
          "dimensionValueId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "dimensionTypeId",
          "dimensionValueId"
        ],
        "additionalProperties": false
      },
      "Elimination": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "COMPUTED",
                  "BY_HAND"
                ]
              },
              "asAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "stale": {
                "type": "boolean"
              },
              "voided": {
                "type": "boolean"
              },
              "postedBy": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "postedAt": {
                "type": "string",
                "minLength": 20
              }
            },
            "required": [
              "id",
              "kind",
              "asAt",
              "stale",
              "voided",
              "postedBy",
              "postedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "EliminationsItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "COMPUTED",
              "BY_HAND"
            ]
          },
          "asAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "stale": {
            "type": "boolean"
          },
          "eliminatedBalanceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "eliminatedNetMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "entity": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "identityHue": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "identityHue"
                  ],
                  "additionalProperties": false
                },
                "account": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "code",
                    "name"
                  ],
                  "additionalProperties": false
                },
                "amountMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                }
              },
              "required": [
                "position",
                "entity",
                "account",
                "amountMinor"
              ],
              "additionalProperties": false
            }
          },
          "postedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "postedAt": {
            "type": "string",
            "minLength": 20
          },
          "voidedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "voidedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "voidReason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "asAt",
          "currency",
          "stale",
          "eliminatedBalanceMinor",
          "eliminatedNetMinor",
          "note",
          "lines",
          "postedBy",
          "postedAt",
          "voidedBy",
          "voidedAt",
          "voidReason"
        ],
        "additionalProperties": false
      },
      "FiguresItem": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "minor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          }
        },
        "required": [
          "label",
          "minor",
          "currency"
        ],
        "additionalProperties": false
      },
      "FindingsItem": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "CROSS_FOOT",
              "TAX_NOT_AS_PRINTED",
              "PAYABLE_NOT_TOTAL",
              "VENDOR_DEFAULT_APPLIED",
              "VENDOR_DEFAULT_UNUSABLE",
              "CODING_RULE_UNUSABLE",
              "ACCOUNT_SHORTLIST_TRUNCATED",
              "DOCUMENT_TRUNCATED",
              "VENDOR_FROM_ADDRESS",
              "ADDRESS_VENDOR_DIFFERS",
              "DOCUMENTARY_TIER",
              "DOCUMENTARY_UNTESTED",
              "REGISTRATION_MISSING",
              "NO_SOURCE_DOCUMENT",
              "CLAIM_WINDOW",
              "REGISTRATION_UNCONFIRMED",
              "CURRENCY_NOT_VENDORS",
              "WITHHOLDING_RESIDENCY_UNSTATED",
              "OVER_BUDGET",
              "PO_REQUIRED",
              "PO_LINE_NOT_ON_ORDER",
              "PO_PRICE_VARIANCE",
              "PO_QUANTITY_VARIANCE",
              "PO_OVER_BILLED",
              "PO_NOT_RECEIVED",
              "PO_NOT_COMPARED",
              "HOLDBACK_UNSTATED",
              "LINE_PROFILE_APPLIED",
              "LINE_PROFILE_NOT_APPLIED",
              "PAID_BY_CARD_STATED"
            ]
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "blocking": {
            "type": "boolean"
          },
          "figures": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FiguresItem"
            }
          }
        },
        "required": [
          "kind",
          "text",
          "blocking",
          "figures"
        ],
        "additionalProperties": false
      },
      "GetCutoverResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "entityTimeZone": {
            "type": "string"
          },
          "conversionDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "previousSystem": {
            "type": "string",
            "enum": [
              "QUICKBOOKS_ONLINE",
              "QUICKBOOKS_DESKTOP",
              "XERO",
              "SAGE_50",
              "SPREADSHEET",
              "OTHER"
            ]
          },
          "previousSystemLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "previousSystemName": {
            "type": "string"
          },
          "suspenseAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          "state": {
            "type": "string",
            "enum": [
              "OPEN",
              "SETTLED",
              "WITHDRAWN"
            ]
          },
          "openedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "openedAt": {
            "type": "string",
            "minLength": 20
          },
          "settledBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "settledAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "itcClaimedInPreviousSystem": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "settledNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "goLiveDate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "openingEntry": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "entryNumber": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "entryDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "status": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "entryNumber",
                  "entryDate",
                  "status"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "checks": {
            "minItems": 7,
            "maxItems": 7,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "check": {
                  "type": "string",
                  "enum": [
                    "CHART",
                    "OPENING_TRIAL_BALANCE",
                    "VENDORS",
                    "PAYABLES_TIE",
                    "SUSPENSE_NIL",
                    "BANKING",
                    "PERIODS_LOCKED"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "PASSED",
                    "FAILED",
                    "NOT_READ"
                  ]
                },
                "claim": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "remedy": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rows": {
                  "maxItems": 25,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "SUPPLIER",
                          "MONTH",
                          "ACCOUNT",
                          "ENTRY",
                          "IMPORT",
                          "LINES"
                        ]
                      },
                      "id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "label": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "href": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "label",
                      "detail",
                      "href"
                    ],
                    "additionalProperties": false
                  }
                },
                "rowsTotal": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "href": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "acknowledged": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "vendorId": {
                        "type": "string"
                      },
                      "vendorName": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "byName": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "vendorId",
                      "vendorName",
                      "reason",
                      "byName"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "check",
                "state",
                "claim",
                "detail",
                "remedy",
                "count",
                "rows",
                "rowsTotal",
                "href",
                "acknowledged"
              ],
              "additionalProperties": false
            }
          },
          "checksDigest": {
            "type": "string",
            "pattern": "^[0-9a-f]{16}$"
          },
          "checksReadAt": {
            "type": "string",
            "minLength": 20
          },
          "figures": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "suspenseMinor": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subledgerMinor": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "controlMinor": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "unexplainedMinor": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "currency",
              "suspenseMinor",
              "subledgerMinor",
              "controlMinor",
              "unexplainedMinor"
            ],
            "additionalProperties": false
          },
          "checksPassing": {
            "type": "integer",
            "minimum": 0,
            "maximum": 7
          },
          "sales": {
            "type": "object",
            "properties": {
              "documentsBeforeGoLive": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "documentsBeforeGoLive"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "entityTimeZone",
          "conversionDate",
          "previousSystem",
          "previousSystemLabel",
          "previousSystemName",
          "suspenseAccount",
          "state",
          "openedBy",
          "openedAt",
          "settledBy",
          "settledAt",
          "itcClaimedInPreviousSystem",
          "note",
          "settledNote",
          "goLiveDate",
          "openingEntry",
          "checks",
          "checksDigest",
          "checksReadAt",
          "figures",
          "checksPassing",
          "sales"
        ],
        "additionalProperties": false
      },
      "GetEntryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ledgerId": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "entryNumber": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "entryRef": {
            "type": "string"
          },
          "entryDate": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "PROPOSED",
              "IN_REVIEW",
              "APPROVED",
              "POSTED",
              "DECLINED",
              "REVERSED"
            ]
          },
          "sourceKind": {
            "type": "string",
            "enum": [
              "MANUAL",
              "AGENT_PROPOSAL",
              "RECURRING",
              "REVERSAL",
              "IMPORT",
              "CHAT",
              "MIGRATION",
              "PAYMENT_RUN",
              "INVOICE",
              "RECEIPT",
              "BILL",
              "BILL_SETTLEMENT",
              "VENDOR_CREDIT"
            ]
          },
          "sourceLabel": {
            "type": "string"
          },
          "sourceLink": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "CREDIT_NOTE",
                      "RECEIPT"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "id",
                  "label",
                  "href"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "layer": {
            "type": "string",
            "enum": [
              "POSTING",
              "ELIMINATION"
            ]
          },
          "autoReverse": {
            "type": "boolean"
          },
          "reversalDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribution": {
            "type": "string"
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "approvedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "postedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "declinedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "declineReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "postedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversesEntryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversedByEntryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversesEntryRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversedByEntryRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "proposal": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "agentLabel": {
                    "type": "string"
                  },
                  "reasoning": {
                    "type": "string"
                  },
                  "confidence": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string"
                  },
                  "promptVersion": {
                    "type": "string"
                  },
                  "configuredByName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "type": "string"
                  },
                  "delivery": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "region": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "regionLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "DOCUMENT",
                              "ENTITY",
                              "NONE"
                            ]
                          }
                        },
                        "required": [
                          "region",
                          "regionLabel",
                          "source"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "findings": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/FindingsItem"
                    }
                  }
                },
                "required": [
                  "id",
                  "agentLabel",
                  "reasoning",
                  "confidence",
                  "model",
                  "promptVersion",
                  "configuredByName",
                  "status",
                  "findings"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "recurringScheduleId": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalDebitMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "totalCreditMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "accountId": {
                  "type": "string"
                },
                "accountCode": {
                  "type": "string"
                },
                "accountName": {
                  "type": "string"
                },
                "accountGifiCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "memo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "amountMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "currency": {
                  "type": "string"
                },
                "functionalCurrency": {
                  "type": "string"
                },
                "functionalAmountMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "fxRate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "fxRateSource": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "BOC",
                        "MANUAL",
                        "PROVIDER"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fxRateDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "taxFxRate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "taxFxRateSource": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "BOC",
                        "MANUAL",
                        "PROVIDER"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "taxFxRateDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "taxAmountMinor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "taxLabel": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "itcEligible": {
                  "type": "boolean"
                },
                "tax": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "treatment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "STANDARD",
                                "ZERO_RATED",
                                "EXEMPT",
                                "OUT_OF_SCOPE",
                                "RELIEVED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "taxPointDate": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "taxPointBasis": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "INVOICE",
                                "INVOICE_UNDELAYED",
                                "AGREEMENT",
                                "PAYMENT",
                                "ENTRY_DATE",
                                "HOLDBACK_RELEASE"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "placeOfSupply": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(CA|US)-[A-Z]{2}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "supplyCategory": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "GOODS",
                                "SERVICES",
                                "INTANGIBLE_PROPERTY",
                                "REAL_PROPERTY"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rateE5": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "codeName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "taxAmountMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "functionalTaxAmountMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "taxProvincialAmountMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "functionalTaxProvincialAmountMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "itcEligible": {
                          "type": "boolean"
                        },
                        "itcRecoverablePct": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[01]\\.\\d{4}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selfAssessed": {
                          "type": "boolean"
                        },
                        "registrationId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "registrationLabel": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "overridden": {
                          "type": "boolean"
                        },
                        "overrideReason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "overriddenByName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "treatment",
                        "taxPointDate",
                        "taxPointBasis",
                        "placeOfSupply",
                        "supplyCategory",
                        "rateE5",
                        "codeName",
                        "taxAmountMinor",
                        "functionalTaxAmountMinor",
                        "taxProvincialAmountMinor",
                        "functionalTaxProvincialAmountMinor",
                        "itcEligible",
                        "itcRecoverablePct",
                        "selfAssessed",
                        "registrationId",
                        "registrationLabel",
                        "overridden",
                        "overrideReason",
                        "overriddenByName"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dimensions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "typeCode": {
                        "type": "string"
                      },
                      "typeLabel": {
                        "type": "string"
                      },
                      "valueCode": {
                        "type": "string"
                      },
                      "valueLabel": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "typeCode",
                      "typeLabel",
                      "valueCode",
                      "valueLabel"
                    ],
                    "additionalProperties": false
                  }
                },
                "customFields": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": [
                      "string",
                      "boolean"
                    ]
                  }
                },
                "carriedFrom": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "accountId",
                "accountCode",
                "accountName",
                "accountGifiCode",
                "memo",
                "amountMinor",
                "currency",
                "functionalCurrency",
                "functionalAmountMinor",
                "fxRate",
                "fxRateSource",
                "fxRateDate",
                "taxFxRate",
                "taxFxRateSource",
                "taxFxRateDate",
                "taxAmountMinor",
                "taxLabel",
                "itcEligible",
                "tax",
                "dimensions"
              ],
              "additionalProperties": false
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "document",
                    "source-transaction",
                    "other"
                  ]
                },
                "addedByName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "documentFileName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sourceTransaction": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "txnDate": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "counterparty": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "amountMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "connectionName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "txnDate",
                        "description",
                        "counterparty",
                        "amountMinor",
                        "currency",
                        "status",
                        "connectionName"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "label",
                "kind",
                "addedByName"
              ],
              "additionalProperties": false
            }
          },
          "history": {
            "$ref": "#/components/schemas/History"
          },
          "historyTotal": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "customFields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          }
        },
        "required": [
          "id",
          "ledgerId",
          "entityId",
          "entityName",
          "entryNumber",
          "entryRef",
          "entryDate",
          "status",
          "sourceKind",
          "sourceLabel",
          "memo",
          "layer",
          "autoReverse",
          "reversalDate",
          "attribution",
          "createdBy",
          "approvedBy",
          "postedBy",
          "declinedBy",
          "declineReason",
          "postedAt",
          "reversesEntryId",
          "reversedByEntryId",
          "recurringScheduleId",
          "totalDebitMinor",
          "totalCreditMinor",
          "lines",
          "evidence",
          "history",
          "historyTotal"
        ],
        "additionalProperties": false
      },
      "GetIntercompanyPairResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "from": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "identityHue": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "identityHue"
            ],
            "additionalProperties": false
          },
          "to": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "identityHue": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "identityHue"
            ],
            "additionalProperties": false
          },
          "bill": {
            "$ref": "#/components/schemas/Bill"
          },
          "decision": {
            "type": "string",
            "enum": [
              "PROPOSED",
              "MIRRORED",
              "DECLINED"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "NO_MIRROR",
              "MIRROR_DRAFT",
              "MATCHED",
              "DIFFERS",
              "MIRROR_VOID",
              "BILL_VOID",
              "DECLINED"
            ]
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CURRENCY",
                "NET",
                "TAX",
                "WRONG_CUSTOMER",
                "MIRROR_WRITTEN_OFF"
              ]
            }
          },
          "differences": {
            "$ref": "#/components/schemas/Differences2"
          },
          "mirror": {
            "$ref": "#/components/schemas/Mirror"
          },
          "mirrorHidden": {
            "type": "boolean"
          },
          "mirrorHow": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "CREATED",
                  "LINKED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "elimination": {
            "$ref": "#/components/schemas/Elimination"
          },
          "proposedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "proposedAt": {
            "type": "string",
            "minLength": 20
          },
          "entityTimeZone": {
            "type": "string"
          },
          "decidedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "decidedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "declineReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "standingCustomer": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "displayName"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "bestCandidate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BestCandidateOption1"
              },
              {
                "type": "null"
              }
            ]
          },
          "eliminations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EliminationsItem"
            }
          },
          "reading": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "OFF",
                  "NOT_NEEDED",
                  "WAITING",
                  "READ",
                  "STOPPED",
                  "FAILED"
                ]
              },
              "outcome": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "READ",
                      "NOTHING_STATED",
                      "UNSANE",
                      "UNPARSABLE",
                      "REFUSED",
                      "DISCLOSURE",
                      "BUDGET",
                      "PROVIDER",
                      "STOPPED_AFTER_DECLINES"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attempts": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3
              },
              "promptVersion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "readAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "state",
              "outcome",
              "attempts",
              "promptVersion",
              "readAt"
            ],
            "additionalProperties": false
          },
          "proposedRevision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "billRevision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "from",
          "to",
          "bill",
          "decision",
          "state",
          "reasons",
          "differences",
          "mirror",
          "mirrorHidden",
          "mirrorHow",
          "elimination",
          "proposedBy",
          "proposedAt",
          "entityTimeZone",
          "decidedBy",
          "decidedAt",
          "declineReason",
          "standingCustomer",
          "bestCandidate",
          "eliminations",
          "reading",
          "proposedRevision",
          "billRevision"
        ],
        "additionalProperties": false
      },
      "GetInvoiceTemplateResponse": {
        "type": "object",
        "properties": {
          "entityId": {
            "type": "string"
          },
          "saved": {
            "type": "boolean"
          },
          "logo": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "contentType": {
                    "type": "string",
                    "enum": [
                      "image/png",
                      "image/svg+xml"
                    ]
                  },
                  "byteSize": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "uploadedAt": {
                    "type": "string",
                    "minLength": 20
                  },
                  "uploadedBy": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "contentType",
                  "byteSize",
                  "sha256",
                  "uploadedAt",
                  "uploadedBy"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "showItemCode": {
            "type": "boolean"
          },
          "showServicePeriod": {
            "type": "boolean"
          },
          "showDiscount": {
            "type": "boolean"
          },
          "showOriginAndHsCode": {
            "type": "boolean"
          },
          "showCustomFields": {
            "type": "boolean"
          },
          "footerNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "termsText": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "entityId",
          "saved",
          "logo",
          "showItemCode",
          "showServicePeriod",
          "showDiscount",
          "showOriginAndHsCode",
          "showCustomFields",
          "footerNote",
          "termsText",
          "updatedAt",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "GetParallelRunMonthResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "periodYear": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "periodMonth": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "periodLabel": {
            "type": "string"
          },
          "periodEnd": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "CLEAN",
              "NOT_CLEAN"
            ]
          },
          "partnerSystem": {
            "type": "string"
          },
          "partnerClosedOn": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "partnerCloseDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "ourCloseDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "recordedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "recordedAt": {
            "type": "string",
            "minLength": 20
          },
          "signedOffBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "signedOffAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "differencesByClass": {
            "$ref": "#/components/schemas/DifferencesByClass"
          },
          "unclassifiedDifferences": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "statementPeriodStart": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "statementPeriodNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "comparisons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "comparison": {
                  "type": "string",
                  "enum": [
                    "CLOSE_TIME",
                    "TRIAL_BALANCE",
                    "STATEMENT",
                    "RETURN",
                    "PAYABLES"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "absent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "total": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "differenceCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "unclassifiedCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "comparison": {
                        "type": "string",
                        "enum": [
                          "CLOSE_TIME",
                          "TRIAL_BALANCE",
                          "STATEMENT",
                          "RETURN",
                          "PAYABLES"
                        ]
                      },
                      "key": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "theirsMinor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "oursMinor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "currency": {
                        "type": "string"
                      },
                      "differenceMinor": {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      "class": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "TIMING",
                              "CLASSIFICATION",
                              "TAX_TREATMENT",
                              "MISSING_SOURCE",
                              "OUR_DEFECT",
                              "THEIR_DEFECT",
                              "UNEXPLAINED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "explanation": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "classifiedBy": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "classifiedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 20
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "vendorId": {
                        "default": null,
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "theirLabel": {
                        "default": null,
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "ourEvidence": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "billsMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "creditMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "heldMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              "billCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "heldBillCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "oldestDueDate": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "bills": {
                                "anyOf": [
                                  {
                                    "maxItems": 25,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "billId": {
                                          "type": "string"
                                        },
                                        "number": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "billDate": {
                                          "type": "string",
                                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                        },
                                        "postingDate": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "dueDate": {
                                          "type": "string",
                                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                        },
                                        "openMinor": {
                                          "type": "string",
                                          "pattern": "^-?\\d+$"
                                        },
                                        "held": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "billId",
                                        "number",
                                        "billDate",
                                        "postingDate",
                                        "dueDate",
                                        "openMinor",
                                        "held"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "billsTruncated": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "billsMinor",
                              "creditMinor",
                              "heldMinor",
                              "billCount",
                              "heldBillCount",
                              "oldestDueDate",
                              "bills",
                              "billsTruncated"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "proposal": {
                        "default": null,
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/ProposalOption1"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "comparison",
                      "key",
                      "label",
                      "theirsMinor",
                      "oursMinor",
                      "currency",
                      "differenceMinor",
                      "class",
                      "explanation",
                      "classifiedBy",
                      "classifiedAt",
                      "vendorId",
                      "theirLabel",
                      "ourEvidence",
                      "proposal"
                    ],
                    "additionalProperties": false
                  }
                },
                "nextCursor": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "comparison",
                "label",
                "description",
                "absent",
                "total",
                "differenceCount",
                "unclassifiedCount",
                "lines",
                "nextCursor"
              ],
              "additionalProperties": false
            }
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "condition": {
                  "type": "string",
                  "enum": [
                    "BOTH_CLOSED",
                    "EVERY_DIFFERENCE_CLASSED",
                    "UNEXPLAINED_IS_ZERO",
                    "NO_OPEN_OUR_DEFECT",
                    "RETURN_RECONCILES",
                    "EVERY_PROPOSAL_NAMED",
                    "COMPARISON_RECORDED"
                  ]
                },
                "passed": {
                  "type": "boolean"
                },
                "claim": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": [
                "condition",
                "passed",
                "claim",
                "detail"
              ],
              "additionalProperties": false
            }
          },
          "signOffReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "consecutiveClean": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "queueMetrics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Queue"
              },
              {
                "type": "null"
              }
            ]
          },
          "payables": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "LEGACY",
                  "COMPARED",
                  "MONTH_NOT_ENDED",
                  "OVER_CEILING"
                ]
              },
              "computedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "computedBy": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tie": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TieOption1"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "footing": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "theirSupplierLinesMinor": {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      "theirTotalMinor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "oursSupplierLinesMinor": {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      "footed": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "theirSupplierLinesMinor",
                      "theirTotalMinor",
                      "oursSupplierLinesMinor",
                      "footed"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "proposals": {
                "type": "object",
                "properties": {
                  "waiting": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "outOfDate": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "setByHand": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "accepted": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "edited": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "declined": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "waiting",
                  "outOfDate",
                  "setByHand",
                  "accepted",
                  "edited",
                  "declined"
                ],
                "additionalProperties": false
              },
              "assistant": {
                "type": "object",
                "properties": {
                  "modelStopped": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "modelStopped"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "state",
              "computedAt",
              "computedBy",
              "tie",
              "footing",
              "proposals",
              "assistant"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "periodYear",
          "periodMonth",
          "periodLabel",
          "periodEnd",
          "status",
          "partnerSystem",
          "partnerClosedOn",
          "partnerCloseDays",
          "ourCloseDays",
          "recordedBy",
          "recordedAt",
          "signedOffBy",
          "signedOffAt",
          "differencesByClass",
          "unclassifiedDifferences",
          "note",
          "timeZone",
          "currency",
          "statementPeriodStart",
          "statementPeriodNote",
          "comparisons",
          "conditions",
          "signOffReasons",
          "consecutiveClean",
          "queueMetrics",
          "payables"
        ],
        "additionalProperties": false
      },
      "GetYearEndSettingsResponse": {
        "type": "object",
        "properties": {
          "entityId": {
            "type": "string"
          },
          "functionalCurrency": {
            "type": "string"
          },
          "allowanceMethod": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "AGEING_BUCKETS",
                  "SPECIFIC_PROVISIONS",
                  "COMBINED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "allowanceAccount": {
            "$ref": "#/components/schemas/Account"
          },
          "badDebtAccount": {
            "$ref": "#/components/schemas/Account"
          },
          "unrealizedFxAccount": {
            "$ref": "#/components/schemas/Account"
          },
          "rates": {
            "minItems": 5,
            "maxItems": 5,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RatesItem"
            }
          },
          "provisionsInForce": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "entityId",
          "functionalCurrency",
          "allowanceMethod",
          "allowanceAccount",
          "badDebtAccount",
          "unrealizedFxAccount",
          "rates",
          "provisionsInForce",
          "updatedAt",
          "updatedBy"
        ],
        "additionalProperties": false
      },
      "History": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "at": {
              "type": "string"
            },
            "action": {
              "type": "string"
            },
            "actorName": {
              "type": [
                "string",
                "null"
              ]
            },
            "actorType": {
              "type": "string",
              "enum": [
                "USER",
                "AGENT",
                "SYSTEM",
                "CUSTOMER"
              ]
            },
            "attribution": {
              "type": "string"
            },
            "targetType": {
              "type": "string"
            },
            "targetId": {
              "type": "string"
            },
            "requestId": {
              "type": [
                "string",
                "null"
              ]
            },
            "clientAddress": {
              "type": [
                "string",
                "null"
              ]
            },
            "before": {
              "anyOf": [
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                {
                  "type": "null"
                }
              ]
            },
            "after": {
              "anyOf": [
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                {
                  "type": "null"
                }
              ]
            },
            "door": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "web",
                    "rest",
                    "mcp"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "operation": {
              "type": [
                "string",
                "null"
              ]
            },
            "connectedAppId": {
              "type": [
                "string",
                "null"
              ]
            },
            "undoGroupId": {
              "type": [
                "string",
                "null"
              ]
            },
            "confirmationId": {
              "type": [
                "string",
                "null"
              ]
            },
            "traceId": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "at",
            "action",
            "actorName",
            "actorType",
            "attribution",
            "targetType",
            "targetId",
            "requestId",
            "clientAddress",
            "door",
            "operation",
            "connectedAppId",
            "undoGroupId",
            "confirmationId",
            "traceId"
          ],
          "additionalProperties": false
        }
      },
      "Imported": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "position": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "placement": {
              "type": "string",
              "enum": [
                "AT_TIME",
                "START_OF_DAY",
                "ON_DAY",
                "IN_PERIOD"
              ]
            },
            "sortsAt": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 20
                },
                {
                  "type": "null"
                }
              ]
            },
            "record": {
              "$ref": "#/components/schemas/Record"
            }
          },
          "required": [
            "position",
            "placement",
            "sortsAt",
            "record"
          ],
          "additionalProperties": false
        }
      },
      "ListAccountCertificationsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "accountCode": {
            "type": "string"
          },
          "accountName": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "periodYear": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "periodMonth": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "periodEnd": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "ledgerBalanceMinor": {
            "type": "string"
          },
          "supportBalanceMinor": {
            "type": "string"
          },
          "differenceMinor": {
            "type": "string"
          },
          "currentLedgerBalanceMinor": {
            "type": "string"
          },
          "stale": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "evidenceDocumentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "certifiedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "certifiedAt": {
            "type": "string",
            "minLength": 20
          },
          "withdrawnBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "withdrawnAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "withdrawReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "supportSourceKind": {
            "type": "string",
            "enum": [
              "TYPED",
              "SUBLEDGER"
            ]
          },
          "supportComputedMinor": {
            "type": [
              "string",
              "null"
            ]
          },
          "computedDifferenceMinor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "accountId",
          "accountCode",
          "accountName",
          "entityId",
          "entityName",
          "periodYear",
          "periodMonth",
          "periodEnd",
          "ledgerBalanceMinor",
          "supportBalanceMinor",
          "differenceMinor",
          "currentLedgerBalanceMinor",
          "stale",
          "note",
          "evidenceDocumentId",
          "certifiedBy",
          "certifiedAt",
          "withdrawnBy",
          "withdrawnAt",
          "withdrawReason",
          "supportSourceKind",
          "supportComputedMinor",
          "computedDifferenceMinor"
        ],
        "additionalProperties": false
      },
      "ListEntitiesResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "functionalCurrency": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "fiscalYearEndMonth": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "timeZone": {
            "type": "string"
          },
          "incorporatedOn": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "legalForm": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "CORPORATION",
                  "SOLE_PROPRIETORSHIP",
                  "PARTNERSHIP",
                  "TRUST"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "exchangeDifferenceAccountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "customerDepositsAccountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "holdbackReceivableAccountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "receivableAccountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "defaultSalesAccountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceTerms": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceTermsFr": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentInstructionsFr": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentLinkTemplate": {
            "type": [
              "string",
              "null"
            ]
          },
          "goLiveDate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "cutoverId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "functionalCurrency",
          "country",
          "region",
          "fiscalYearEndMonth",
          "timeZone",
          "incorporatedOn",
          "legalForm",
          "exchangeDifferenceAccountId",
          "customerDepositsAccountId"
        ],
        "additionalProperties": false
      },
      "ListFxRatesResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "rateDate": {
            "type": "string"
          },
          "base": {
            "type": "string"
          },
          "quote": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "BOC",
              "MANUAL",
              "PROVIDER"
            ]
          },
          "overrideReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "enteredByName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "rateDate",
          "base",
          "quote",
          "rate",
          "source",
          "overrideReason",
          "enteredByName"
        ],
        "additionalProperties": false
      },
      "ListImportedHistoryResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Record"
        }
      },
      "ListMigrationFindingsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "readingId": {
            "type": "string"
          },
          "lineNo": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "cause": {
            "$ref": "#/components/schemas/Cause"
          },
          "severity": {
            "type": "string",
            "enum": [
              "NEEDS_LOOK",
              "FYI"
            ]
          },
          "basis": {
            "type": "string",
            "enum": [
              "RULE",
              "MODEL"
            ]
          },
          "subject": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "vendorId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "key",
              "label",
              "vendorId"
            ],
            "additionalProperties": false
          },
          "other": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "vendorId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "key",
                  "label",
                  "vendorId"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "leftMinor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "rightMinor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "differenceMinor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "explanation": {
            "type": "string"
          },
          "evidence": {
            "type": "object",
            "properties": {
              "rows": {
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "line": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "balanceMinor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "asReadMinor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "why": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "line",
                    "number",
                    "balanceMinor",
                    "asReadMinor",
                    "why"
                  ],
                  "additionalProperties": false
                }
              },
              "rowsTotal": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "files": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "importId": {
                      "type": "string"
                    },
                    "fileName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "importId",
                    "fileName"
                  ],
                  "additionalProperties": false
                }
              },
              "candidates": {
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "BOOKS",
                        "FILE"
                      ]
                    },
                    "vendorId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "line": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "vendorId",
                    "name",
                    "line"
                  ],
                  "additionalProperties": false
                }
              },
              "pair": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "theirs": {
                        "type": "string"
                      },
                      "ours": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "theirs",
                      "ours"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "note": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "where": {
                        "type": "string",
                        "enum": [
                          "BILL_MEMO",
                          "SUPPLIER_NOTE"
                        ]
                      },
                      "line": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "PAID_OR_PART_PAID",
                          "CREDIT_OR_ADJUSTMENT",
                          "DISPUTED_OR_ON_HOLD",
                          "DUPLICATE_OF_ANOTHER",
                          "INACTIVE_OR_CLOSED",
                          "MERGED_OR_RENAMED",
                          "NOTHING_STATED"
                        ]
                      },
                      "text": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "where",
                      "line",
                      "reason",
                      "text"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "month": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "periodLabel": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "periodLabel"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "rows",
              "rowsTotal",
              "files",
              "candidates",
              "pair",
              "note",
              "month"
            ],
            "additionalProperties": false
          },
          "proposal": {
            "type": "boolean"
          },
          "proposedClass": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "TIMING",
                  "CLASSIFICATION",
                  "MISSING_SOURCE",
                  "OUR_DEFECT"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "lineId": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "FACT",
              "WAITING",
              "ACCEPTED",
              "CHANGED",
              "DECLINED",
              "SUPPRESSED",
              "STALE"
            ]
          },
          "decision": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "by": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "at": {
                    "type": "string",
                    "minLength": 20
                  },
                  "finalClass": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "TIMING",
                          "CLASSIFICATION",
                          "MISSING_SOURCE",
                          "OUR_DEFECT"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "finalReason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "PAID_OR_PART_PAID",
                          "CREDIT_OR_ADJUSTMENT",
                          "DISPUTED_OR_ON_HOLD",
                          "DUPLICATE_OF_ANOTHER",
                          "INACTIVE_OR_CLOSED",
                          "MERGED_OR_RENAMED",
                          "NOTHING_STATED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "ACCEPTED",
                      "CHANGED",
                      "DECLINED"
                    ]
                  }
                },
                "required": [
                  "by",
                  "at",
                  "finalClass",
                  "finalReason",
                  "note",
                  "state"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "suppressedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "by": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "at": {
                    "type": "string",
                    "minLength": 20
                  },
                  "until": {
                    "type": "string",
                    "minLength": 20
                  }
                },
                "required": [
                  "by",
                  "at",
                  "until"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "staleWhy": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "readingId",
          "lineNo",
          "cause",
          "severity",
          "basis",
          "subject",
          "other",
          "leftMinor",
          "rightMinor",
          "differenceMinor",
          "currency",
          "explanation",
          "evidence",
          "proposal",
          "proposedClass",
          "lineId",
          "state",
          "decision",
          "suppressedBy",
          "staleWhy"
        ],
        "additionalProperties": false
      },
      "ListMigrationReadingsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "cutoverId": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "entityTimeZone": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "SUPPLIER_LISTS",
              "OPEN_PAYABLES",
              "BANKING_FILE",
              "FIRST_MONTH"
            ]
          },
          "readAt": {
            "type": "string",
            "minLength": 20
          },
          "readBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "side": {
                  "type": "string",
                  "enum": [
                    "LEFT",
                    "RIGHT"
                  ]
                },
                "importId": {
                  "type": "string"
                },
                "importKind": {
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                },
                "fileSha256": {
                  "type": "string",
                  "maxLength": 12
                },
                "statusAtRead": {
                  "type": "string"
                },
                "rowsAtRead": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "side",
                "importId",
                "importKind",
                "fileName",
                "fileSha256",
                "statusAtRead",
                "rowsAtRead"
              ],
              "additionalProperties": false
            }
          },
          "typed": {
            "type": "object",
            "properties": {
              "reportTotalMinor": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trialBalancePayableMinor": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "reportTotalMinor",
              "trialBalancePayableMinor"
            ],
            "additionalProperties": false
          },
          "figures": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "SUPPLIER_LISTS"
                  },
                  "listedRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "listedSuppliers": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "owedSuppliers": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "listedNotOwed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "poolTruncated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "listedRows",
                  "listedSuppliers",
                  "owedSuppliers",
                  "listedNotOwed",
                  "poolTruncated"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "OPEN_PAYABLES"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "reportTotalMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fileRowsAsReadMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "readyInForceMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "changedByHandMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "heldMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "creditsMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "remainderMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unconvertedRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unreadableRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "readyRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "heldRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "creditRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "changedRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "trialBalancePayableMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trialBalanceDifferenceMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "postedMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "postedDifferenceMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "currency",
                  "reportTotalMinor",
                  "fileRowsAsReadMinor",
                  "readyInForceMinor",
                  "changedByHandMinor",
                  "heldMinor",
                  "creditsMinor",
                  "remainderMinor",
                  "unconvertedRows",
                  "unreadableRows",
                  "readyRows",
                  "heldRows",
                  "creditRows",
                  "changedRows",
                  "trialBalancePayableMinor",
                  "trialBalanceDifferenceMinor",
                  "postedMinor",
                  "postedDifferenceMinor"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "BANKING_FILE"
                  },
                  "owedSuppliers": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "verified": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "waiting": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "inFileInReview": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "none": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unknownRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "differing": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "kind",
                  "owedSuppliers",
                  "verified",
                  "waiting",
                  "inFileInReview",
                  "none",
                  "unknownRows",
                  "differing"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "FIRST_MONTH"
                  },
                  "periodLabel": {
                    "type": "string"
                  },
                  "linesWithDifference": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "proposed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "linesWithProposals": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "linesLeft": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "kind",
                  "periodLabel",
                  "linesWithDifference",
                  "proposed",
                  "linesWithProposals",
                  "linesLeft"
                ],
                "additionalProperties": false
              }
            ]
          },
          "counts": {
            "type": "object",
            "properties": {
              "findings": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "needsLook": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "fyi": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "proposals": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "waiting": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "accepted": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "changed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "declined": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "suppressed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "stale": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "findings",
              "needsLook",
              "fyi",
              "proposals",
              "waiting",
              "accepted",
              "changed",
              "declined",
              "suppressed",
              "stale"
            ],
            "additionalProperties": false
          },
          "latest": {
            "type": "boolean"
          },
          "newerReadingId": {
            "type": [
              "string",
              "null"
            ]
          },
          "assistant": {
            "type": "object",
            "properties": {
              "runs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "last": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "runs",
              "last"
            ],
            "additionalProperties": false
          },
          "rulesVersion": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "cutoverId",
          "entityId",
          "entityName",
          "entityTimeZone",
          "kind",
          "readAt",
          "readBy",
          "currency",
          "files",
          "typed",
          "figures",
          "counts",
          "latest",
          "newerReadingId",
          "assistant",
          "rulesVersion"
        ],
        "additionalProperties": false
      },
      "ListSchedulesResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "BIWEEKLY",
              "MONTHLY",
              "QUARTERLY",
              "ANNUAL"
            ]
          },
          "startDate": {
            "type": "string"
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextRunDate": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "autoReverse": {
            "type": "boolean"
          },
          "reversalOffsetDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "approvalMode": {
            "type": "string",
            "enum": [
              "QUEUE",
              "AUTO_APPROVE"
            ]
          },
          "createdByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "producedEntries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "entryRef": {
                  "type": "string"
                },
                "entryDate": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "DRAFT",
                    "PROPOSED",
                    "IN_REVIEW",
                    "APPROVED",
                    "POSTED",
                    "DECLINED",
                    "REVERSED"
                  ]
                }
              },
              "required": [
                "id",
                "entryRef",
                "entryDate",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "producedEntriesTotal": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "kind": {
            "type": "string",
            "enum": [
              "ENTRY",
              "BILL"
            ]
          },
          "vendorName": {
            "type": [
              "string",
              "null"
            ]
          },
          "producedBills": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduledFor": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "DRAFT",
                    "IN_REVIEW",
                    "APPROVED",
                    "PARTIALLY_PAID",
                    "PAID",
                    "VOID"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "scheduledFor",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "producedBillsTotal": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "name",
          "entityName",
          "frequency",
          "startDate",
          "endDate",
          "nextRunDate",
          "active",
          "autoReverse",
          "reversalOffsetDays",
          "approvalMode",
          "createdByName",
          "producedEntries",
          "producedEntriesTotal"
        ],
        "additionalProperties": false
      },
      "ListSpecificProvisionsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ],
            "additionalProperties": false
          },
          "amountMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "currency": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "effectiveFrom": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "effectiveTo": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "updatedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedAt": {
            "type": "string",
            "minLength": 20
          }
        },
        "required": [
          "id",
          "entityId",
          "customer",
          "amountMinor",
          "currency",
          "reason",
          "effectiveFrom",
          "effectiveTo",
          "createdBy",
          "createdAt",
          "updatedBy",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Mark": {
        "type": "object",
        "properties": {
          "importId": {
            "type": "string"
          },
          "lineNumber": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "documentId": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "fileSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "sourceSystem": {
            "type": "string",
            "enum": [
              "QUICKBOOKS_ONLINE",
              "QUICKBOOKS_DESKTOP",
              "XERO",
              "SAGE_50",
              "SPREADSHEET",
              "OTHER"
            ]
          },
          "sourceSystemLabel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "sourceRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "uploadedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "approvedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "approvedAt": {
            "type": "string",
            "minLength": 20
          }
        },
        "required": [
          "importId",
          "lineNumber",
          "documentId",
          "fileName",
          "fileSha256",
          "sourceSystem",
          "sourceSystemLabel",
          "sourceRef",
          "uploadedBy",
          "approvedBy",
          "approvedAt"
        ],
        "additionalProperties": false
      },
      "MergeDimensionValueResponse": {
        "type": "object",
        "properties": {
          "value": {
            "$ref": "#/components/schemas/ValuesItem"
          },
          "mergedIntoId": {
            "type": [
              "string",
              "null"
            ]
          },
          "repointedValueIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "value",
          "mergedIntoId",
          "repointedValueIds"
        ],
        "additionalProperties": false
      },
      "Mirror": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/MirrorOption1"
          },
          {
            "type": "null"
          }
        ]
      },
      "MirrorOption1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "APPROVED",
              "PARTIALLY_PAID",
              "PAID",
              "VOID",
              "WRITTEN_OFF"
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "subtotalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "taxMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "totalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "openMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "issueDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "currency",
          "subtotalMinor",
          "taxMinor",
          "totalMinor",
          "openMinor",
          "issueDate",
          "customer"
        ],
        "additionalProperties": false
      },
      "Pair": {
        "type": "object",
        "properties": {
          "asked": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "leftOut": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "outcome": {
            "type": "string",
            "enum": [
              "ANSWERED",
              "NOTHING_TO_ASK",
              "PROVIDER",
              "DISCLOSURE",
              "BUDGET",
              "LIMIT",
              "UNPARSABLE",
              "REFUSED",
              "UNKNOWN_REF",
              "STOPPED_AFTER_THREE_DECLINES"
            ]
          },
          "why": {
            "type": [
              "string",
              "null"
            ]
          },
          "promptVersion": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "asked",
          "leftOut",
          "outcome",
          "why",
          "promptVersion"
        ],
        "additionalProperties": false
      },
      "Performance": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "region": {
              "type": "string",
              "pattern": "^(CA|US)-[A-Z]{2}$"
            },
            "share": {
              "type": "string",
              "pattern": "^(0(\\.\\d+)?|1(\\.0+)?)$"
            }
          },
          "required": [
            "region",
            "share"
          ],
          "additionalProperties": false
        }
      },
      "Period2": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "$ref": "#/components/schemas/Code"
          },
          "requestId": {
            "type": [
              "string",
              "null"
            ]
          },
          "fields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "remedy": {
            "type": "string"
          },
          "maxBytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ],
        "additionalProperties": false
      },
      "ProposalOption1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "lineId": {
            "type": "string"
          },
          "entityTimeZone": {
            "type": "string"
          },
          "line": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "theirLabel": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "key",
              "label",
              "theirLabel"
            ],
            "additionalProperties": false
          },
          "pairedLine": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "key",
                  "label"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "basis": {
            "type": "string",
            "enum": [
              "RULE",
              "MODEL"
            ]
          },
          "cause": {
            "type": "string",
            "enum": [
              "BILL_DATED_ACROSS_MONTH_END",
              "PAYMENT_DATED_ACROSS_MONTH_END",
              "BILL_ONLY_IN_OURS",
              "BILL_NOT_POSTED_HERE",
              "PAYMENT_ONLY_IN_OURS",
              "DUPLICATE_BILL_OURS",
              "SAME_SUPPLIER_OTHER_NAME"
            ]
          },
          "causeLabel": {
            "type": "string"
          },
          "class": {
            "type": "string",
            "enum": [
              "TIMING",
              "CLASSIFICATION",
              "TAX_TREATMENT",
              "MISSING_SOURCE",
              "OUR_DEFECT",
              "THEIR_DEFECT",
              "UNEXPLAINED"
            ]
          },
          "explanation": {
            "type": "string"
          },
          "evidence": {
            "type": "object",
            "properties": {
              "bills": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "billId": {
                      "type": "string"
                    },
                    "number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "billDate": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "postingDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "amountMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    }
                  },
                  "required": [
                    "billId",
                    "number",
                    "billDate",
                    "postingDate",
                    "status",
                    "amountMinor"
                  ],
                  "additionalProperties": false
                }
              },
              "settlements": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "settlementId": {
                      "type": "string"
                    },
                    "billId": {
                      "type": "string"
                    },
                    "billNumber": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "settledOn": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "postingDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "amountMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "method": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "settlementId",
                    "billId",
                    "billNumber",
                    "settledOn",
                    "postingDate",
                    "amountMinor",
                    "method"
                  ],
                  "additionalProperties": false
                }
              },
              "names": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "theirs": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "ours": {
                        "type": "string",
                        "maxLength": 120
                      }
                    },
                    "required": [
                      "theirs",
                      "ours"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "window": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Period2"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "amountMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              }
            },
            "required": [
              "bills",
              "settlements",
              "names",
              "window",
              "amountMinor"
            ],
            "additionalProperties": false
          },
          "forDifferenceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "state": {
            "type": "string",
            "enum": [
              "PROPOSED",
              "ACCEPTED",
              "EDITED",
              "DECLINED"
            ]
          },
          "displayState": {
            "type": "string",
            "enum": [
              "WAITING",
              "OUT_OF_DATE",
              "SET_BY_HAND",
              "ACCEPTED",
              "EDITED",
              "DECLINED"
            ]
          },
          "proposedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "proposedAt": {
            "type": "string",
            "minLength": 20
          },
          "decidedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "decidedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "finalClass": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "TIMING",
                  "CLASSIFICATION",
                  "TAX_TREATMENT",
                  "MISSING_SOURCE",
                  "OUR_DEFECT",
                  "THEIR_DEFECT",
                  "UNEXPLAINED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "promptVersion": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "lineId",
          "entityTimeZone",
          "line",
          "pairedLine",
          "basis",
          "cause",
          "causeLabel",
          "class",
          "explanation",
          "evidence",
          "forDifferenceMinor",
          "state",
          "displayState",
          "proposedBy",
          "proposedAt",
          "decidedBy",
          "decidedAt",
          "finalClass",
          "promptVersion"
        ],
        "additionalProperties": false
      },
      "Queue": {
        "type": "object",
        "properties": {
          "reviewed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "accepted": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "rejected": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pending": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "acceptance": {
            "$ref": "#/components/schemas/Acceptance"
          },
          "edited": {
            "$ref": "#/components/schemas/Acceptance"
          },
          "timeToReview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "medianHours": {
                    "type": "number"
                  },
                  "p90Hours": {
                    "type": "number"
                  },
                  "of": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "medianHours",
                  "p90Hours",
                  "of"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "editedProposals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "fieldsFrom": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "changed": {
                  "$ref": "#/components/schemas/AutoCompletedOption1"
                }
              },
              "required": [
                "field",
                "changed"
              ],
              "additionalProperties": false
            }
          },
          "fieldsMore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "reviewed",
          "accepted",
          "rejected",
          "pending",
          "acceptance",
          "edited",
          "timeToReview",
          "editedProposals",
          "fieldsFrom",
          "fields",
          "fieldsMore"
        ],
        "additionalProperties": false
      },
      "RatesItem": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "enum": [
              "CURRENT",
              "D1_TO_30",
              "D31_TO_60",
              "D61_TO_90",
              "OVER_90"
            ]
          },
          "basisPoints": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "bucket",
          "basisPoints"
        ],
        "additionalProperties": false
      },
      "Record": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "AUDIT_LINE"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "actorName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actorEmail": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "action": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "targetDescription": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "amountMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "before": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "after": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "zoneAssumed": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "actorName",
                  "actorEmail",
                  "action",
                  "targetDescription",
                  "amountMinor",
                  "currency",
                  "before",
                  "after",
                  "note",
                  "zoneAssumed"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "CONTROL_FIRING"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "controlName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "AUTO_APPROVED",
                      "ROUTED",
                      "REFUSED",
                      "CHANGED"
                    ]
                  },
                  "subjectRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "amountMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actorName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "controlName",
                  "outcome",
                  "subjectRef",
                  "amountMinor",
                  "currency",
                  "actorName",
                  "reason"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "PERIOD_LOCK"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "lockedThrough": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scope": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subledger": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lockedByName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lockedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unlockedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unlockedByName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "lockedThrough",
                  "scope",
                  "subledger",
                  "lockedByName",
                  "lockedOn",
                  "unlockedOn",
                  "unlockedByName",
                  "reason"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "REPORT_PACK"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "statusAsIssued": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "issuedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "issuedByName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "title",
                  "statusAsIssued",
                  "issuedOn",
                  "issuedByName"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "SLIP_FILE"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "T4A",
                      "T5018"
                    ]
                  },
                  "taxYear": {
                    "type": "integer",
                    "minimum": 1900,
                    "maximum": 2200
                  },
                  "periodEnd": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "slipCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "totalMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "reportType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ORIGINAL",
                          "AMENDMENT"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "filedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "confirmationNumber": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "taxYear",
                  "periodEnd",
                  "slipCount",
                  "totalMinor",
                  "reportType",
                  "filedOn",
                  "confirmationNumber"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "FX_RATE"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "base": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "quote": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "rate": {
                    "type": "string",
                    "pattern": "^\\d{1,6}\\.\\d{6}$"
                  },
                  "rateSourceAsNamed": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "base",
                  "quote",
                  "rate",
                  "rateSourceAsNamed",
                  "note"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "SCHEDULE"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "templateType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "intervalText": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "unit": {
                            "type": "string",
                            "enum": [
                              "DAY",
                              "WEEK",
                              "MONTH",
                              "YEAR"
                            ]
                          },
                          "every": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 366
                          }
                        },
                        "required": [
                          "unit",
                          "every"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previousDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "nextDateInSource": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "counterpartyName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "amountMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "activeInSource": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "templateType",
                  "intervalText",
                  "interval",
                  "previousDate",
                  "nextDateInSource",
                  "endDate",
                  "counterpartyName",
                  "amountMinor",
                  "currency",
                  "activeInSource"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "QUEUE_DECISION"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "recordType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "APPROVED",
                      "DECLINED"
                    ]
                  },
                  "decidedByName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "submittedByName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "amountMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "recordType",
                  "reference",
                  "decision",
                  "decidedByName",
                  "submittedByName",
                  "amountMinor",
                  "currency",
                  "reason"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "TAX_OVERRIDE"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "engineOrDefaultTreatment": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "chosenTreatment": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "taxAmountMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "registrationNumber": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "overriddenByName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "reference",
                  "engineOrDefaultTreatment",
                  "chosenTreatment",
                  "reason",
                  "taxAmountMinor",
                  "currency",
                  "registrationNumber",
                  "overriddenByName"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "PAID_BILL"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "supplierName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "number": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "paidOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "subtotalMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "taxMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "totalMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "functionalTotalMinor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "paymentMethod": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "paymentReference": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "memo": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "supplierName",
                  "number",
                  "dueDate",
                  "paidOn",
                  "currency",
                  "subtotalMinor",
                  "taxMinor",
                  "totalMinor",
                  "functionalTotalMinor",
                  "paymentMethod",
                  "paymentReference",
                  "memo"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "occurredOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 20
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "periodYear": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periodMonth": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "entityId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entityName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadVersion": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "mark": {
                "$ref": "#/components/schemas/Mark"
              },
              "createdAt": {
                "type": "string",
                "minLength": 20
              },
              "vendor": {
                "$ref": "#/components/schemas/Vendor"
              },
              "kind": {
                "type": "string",
                "const": "VENDOR_PAYMENT"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "supplierName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "amountMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "method": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reference": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "paidFromAccountName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "billsAppliedText": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "memo": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "supplierName",
                  "currency",
                  "amountMinor",
                  "method",
                  "reference",
                  "paidFromAccountName",
                  "billsAppliedText",
                  "memo"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "occurredOn",
              "occurredAt",
              "occurredZone",
              "periodYear",
              "periodMonth",
              "subject",
              "entityId",
              "entityName",
              "payloadVersion",
              "mark",
              "createdAt",
              "vendor",
              "kind",
              "payload"
            ],
            "additionalProperties": false
          }
        ]
      },
      "RegisterAssetRequest": {
        "type": "object",
        "properties": {
          "entityId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "acquiredOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "inServiceOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "costMajor": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d{1,2})?$"
          },
          "salvageMajor": {
            "default": "0",
            "type": "string",
            "pattern": "^\\d+(\\.\\d{1,2})?$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "method": {
            "type": "string",
            "enum": [
              "STRAIGHT_LINE",
              "DECLINING_BALANCE"
            ]
          },
          "usefulLifeMonths": {
            "type": "integer",
            "minimum": 1,
            "maximum": 600
          },
          "decliningRatePct": {
            "type": "string",
            "pattern": "^\\d{1,3}(\\.\\d{1,3})?$"
          },
          "ccaClass": {
            "type": "string",
            "enum": [
              "1",
              "3",
              "6",
              "8",
              "10",
              "12",
              "16",
              "43",
              "44",
              "46",
              "50",
              "53",
              "54",
              "55",
              "56",
              "10.1",
              "14.1",
              "43.1",
              "43.2"
            ]
          },
          "isPassengerVehicle": {
            "type": "boolean"
          },
          "assetAccountId": {
            "type": "string",
            "minLength": 1
          },
          "accumulatedAccountId": {
            "type": "string",
            "minLength": 1
          },
          "expenseAccountId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "entityId",
          "name",
          "acquiredOn",
          "inServiceOn",
          "costMajor",
          "currency",
          "method",
          "usefulLifeMonths",
          "assetAccountId",
          "accumulatedAccountId",
          "expenseAccountId"
        ],
        "additionalProperties": false
      },
      "RegisterAssetResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "acquiredOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "inServiceOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "costMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "salvageMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "currency": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "STRAIGHT_LINE",
              "DECLINING_BALANCE"
            ]
          },
          "usefulLifeMonths": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "decliningRateE5": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "ccaClass": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "1",
                  "3",
                  "6",
                  "8",
                  "10",
                  "12",
                  "16",
                  "43",
                  "44",
                  "46",
                  "50",
                  "53",
                  "54",
                  "55",
                  "56",
                  "10.1",
                  "14.1",
                  "43.1",
                  "43.2"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "isPassengerVehicle": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DISPOSED",
              "FULLY_DEPRECIATED"
            ]
          },
          "disposedOn": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "disposalProceedsMinor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "disposalEntryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "disposalEntryStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "disposalBinds": {
            "type": "boolean"
          },
          "accumulatedPostedMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "netBookValueMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "pendingRows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "assetAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          "accumulatedAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          "expenseAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          "createdByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "schedule": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "periodYear": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "periodMonth": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 12
                },
                "periodLabel": {
                  "type": "string"
                },
                "amountMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "entryId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "entryNumber": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entryStatus": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "handedToQueueAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 20
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "periodYear",
                "periodMonth",
                "periodLabel",
                "amountMinor",
                "entryId",
                "entryNumber",
                "entryStatus",
                "handedToQueueAt"
              ],
              "additionalProperties": false
            }
          },
          "scheduleTotalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "cca": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fiscalYear": {
                  "$ref": "#/components/schemas/Window"
                },
                "row": {
                  "type": "object",
                  "properties": {
                    "ccaClass": {
                      "type": "string",
                      "enum": [
                        "1",
                        "3",
                        "6",
                        "8",
                        "10",
                        "12",
                        "16",
                        "43",
                        "44",
                        "46",
                        "50",
                        "53",
                        "54",
                        "55",
                        "56",
                        "10.1",
                        "14.1",
                        "43.1",
                        "43.2"
                      ]
                    },
                    "assetId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assetName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "rateE5": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "openingUccMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "additionsMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "dispositionsMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "regime": {
                      "type": "string",
                      "enum": [
                        "HALF_YEAR",
                        "AII_PHASE_1",
                        "AII_PHASE_OUT",
                        "AII_REINSTATED_2025",
                        "AII_REINSTATED_NIL",
                        "CLEAN_ENERGY_FULL_EXPENSING",
                        "MANUFACTURING_FULL_EXPENSING",
                        "PRODUCTIVITY_ASSETS",
                        "ZERO_EMISSION_ENHANCED",
                        "NONE"
                      ]
                    },
                    "adjustmentMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "baseMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "ccaMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "closingUccMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "recaptureMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "terminalLossMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "dispositionsNotPostedCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "ccaClass",
                    "assetId",
                    "assetName",
                    "rateE5",
                    "openingUccMinor",
                    "additionsMinor",
                    "dispositionsMinor",
                    "regime",
                    "adjustmentMinor",
                    "baseMinor",
                    "ccaMinor",
                    "closingUccMinor",
                    "recaptureMinor",
                    "terminalLossMinor",
                    "dispositionsNotPostedCount",
                    "notes"
                  ],
                  "additionalProperties": false
                },
                "bookDepreciationMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "bookVsTaxMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                }
              },
              "required": [
                "fiscalYear",
                "row",
                "bookDepreciationMinor",
                "bookVsTaxMinor"
              ],
              "additionalProperties": false
            }
          },
          "ccaRefusal": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "assetId": {
                    "type": "string"
                  },
                  "assetName": {
                    "type": "string"
                  },
                  "ccaClass": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "remedy": {
                    "type": "string"
                  }
                },
                "required": [
                  "assetId",
                  "assetName",
                  "ccaClass",
                  "reason",
                  "remedy"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "name",
          "description",
          "acquiredOn",
          "inServiceOn",
          "costMinor",
          "salvageMinor",
          "currency",
          "method",
          "usefulLifeMonths",
          "decliningRateE5",
          "ccaClass",
          "source",
          "isPassengerVehicle",
          "status",
          "disposedOn",
          "disposalProceedsMinor",
          "disposalEntryId",
          "disposalEntryStatus",
          "disposalBinds",
          "accumulatedPostedMinor",
          "netBookValueMinor",
          "pendingRows",
          "assetAccount",
          "accumulatedAccount",
          "expenseAccount",
          "createdByName",
          "createdAt",
          "schedule",
          "scheduleTotalMinor",
          "cca",
          "ccaRefusal"
        ],
        "additionalProperties": false
      },
      "Source": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "billId": {
                "type": "string"
              },
              "billNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "supplierName": {
                "type": "string"
              },
              "billDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "billLineId": {
                "type": "string"
              },
              "linePosition": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "billId",
              "billNumber",
              "supplierName",
              "billDate",
              "billLineId",
              "linePosition"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "Tax": {
        "type": "object",
        "properties": {
          "supplyCategory": {
            "type": "string",
            "enum": [
              "GOODS",
              "SERVICES",
              "INTANGIBLE_PROPERTY",
              "REAL_PROPERTY"
            ]
          },
          "treatmentHint": {
            "type": "string",
            "enum": [
              "STANDARD",
              "ZERO_RATED",
              "EXEMPT",
              "OUT_OF_SCOPE"
            ]
          },
          "itcKind": {
            "default": "GENERAL",
            "type": "string",
            "enum": [
              "GENERAL",
              "MEALS_ENTERTAINMENT",
              "PASSENGER_VEHICLE",
              "ZERO_EMISSION_VEHICLE",
              "EXEMPT_ACTIVITY",
              "NONE"
            ]
          },
          "selfAssessed": {
            "default": false,
            "type": "boolean"
          },
          "provincialServiceKind": {
            "type": "string",
            "enum": [
              "ACCOUNTING",
              "ARCHITECTURAL_OR_ENGINEERING",
              "SECURITY",
              "NON_RESIDENTIAL_REAL_ESTATE",
              "ADVERTISING",
              "ACCOMMODATION"
            ]
          },
          "provincialBase": {
            "type": "string",
            "enum": [
              "IN_BASE",
              "OUTSIDE_BASE"
            ]
          },
          "provincialExemption": {
            "type": "string",
            "enum": [
              "RESALE"
            ]
          },
          "commercialUsePct": {
            "type": "string",
            "pattern": "^(?:0(?:\\.\\d{1,4})?|1(?:\\.0{1,4})?)$"
          },
          "override": {
            "type": "object",
            "properties": {
              "taxCodeId": {
                "type": "string",
                "minLength": 1
              },
              "treatment": {
                "type": "string",
                "enum": [
                  "STANDARD",
                  "ZERO_RATED",
                  "EXEMPT",
                  "OUT_OF_SCOPE"
                ]
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "reason"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "supplyCategory"
        ],
        "additionalProperties": false
      },
      "Tax2": {
        "type": "object",
        "properties": {
          "side": {
            "type": "string",
            "enum": [
              "SALE",
              "PURCHASE"
            ]
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "country": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "region": {
                "type": "string",
                "pattern": "^(CA|US)-[A-Z]{2}$"
              },
              "addresses": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "region": {
                      "type": "string",
                      "pattern": "^(CA|US)-[A-Z]{2}$"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "HOME",
                        "BUSINESS",
                        "OTHER"
                      ]
                    },
                    "mostCloselyConnected": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "region",
                    "kind"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "country"
            ],
            "additionalProperties": false
          },
          "deliveryRegion": {
            "type": "string",
            "pattern": "^(CA|US)-[A-Z]{2}$"
          },
          "deliveryCountry": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "performance": {
            "$ref": "#/components/schemas/Performance"
          },
          "rightsUsableIn": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^(CA|US)-[A-Z]{2}$"
            }
          },
          "rightsUsableShares": {
            "$ref": "#/components/schemas/Performance"
          },
          "propertyRegion": {
            "type": "string",
            "pattern": "^(CA|US)-[A-Z]{2}$"
          },
          "taxPoint": {
            "type": "object",
            "properties": {
              "invoiceDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "invoiceUndelayedDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "agreementDueDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "paymentDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "side",
          "counterparty"
        ],
        "additionalProperties": false
      },
      "TieOption1": {
        "type": "object",
        "properties": {
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "asOf": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "subledgerMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "controlMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "settlementResidualMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "unexplainedMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "unappliedCreditMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "unnamedLineCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "tied": {
            "type": "boolean"
          },
          "controlAccounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "balanceMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "BILL",
                    "SETTINGS",
                    "GIFI_FALLBACK"
                  ]
                },
                "subledgerMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "settlementResidualMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "unexplainedMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                }
              },
              "required": [
                "id",
                "code",
                "name",
                "balanceMinor",
                "source",
                "subledgerMinor",
                "settlementResidualMinor",
                "unexplainedMinor"
              ],
              "additionalProperties": false
            }
          },
          "exchangeAccountNominated": {
            "type": "boolean"
          }
        },
        "required": [
          "entityId",
          "entityName",
          "currency",
          "asOf",
          "subledgerMinor",
          "controlMinor",
          "settlementResidualMinor",
          "unexplainedMinor",
          "unappliedCreditMinor",
          "unnamedLineCount",
          "tied",
          "controlAccounts",
          "exchangeAccountNominated"
        ],
        "additionalProperties": false
      },
      "Totals": {
        "type": "object",
        "properties": {
          "native": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "imported": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "native",
          "imported"
        ],
        "additionalProperties": false
      },
      "Values": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ValuesItem"
        }
      },
      "ValuesItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dimensionTypeId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "dimensionTypeId",
          "code",
          "name",
          "parentId",
          "active"
        ],
        "additionalProperties": false
      },
      "Vendor": {
        "default": null,
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "placement": {
                "type": "string",
                "enum": [
                  "NAME",
                  "ALIAS"
                ]
              }
            },
            "required": [
              "id",
              "displayName",
              "placement"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "Window": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "end": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "start",
          "end",
          "label"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "Problem400": {
        "description": "The request has no Idempotency-Key header.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem401": {
        "description": "The key or token is missing, malformed, unknown, revoked or expired.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem403": {
        "description": "The key or token may not do this, or the books are closed to the API.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem404": {
        "description": "There is no such record on these books.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem409": {
        "description": "An identical request is still running, or another change reached the record first.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem412": {
        "description": "The books refuse this in their current state. The problem body says what to change.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem422": {
        "description": "A field is invalid or cannot be set through the API, or the Idempotency-Key was reused for a different request.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem429": {
        "description": "Too many requests. Wait the number of seconds in Retry-After.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem500": {
        "description": "A fault on our side. Quote the X-Request-Id when you write to us.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "A new value for each new request (a UUID is fine), the same value when you retry it. Kept for 7 days.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        }
      }
    },
    "headers": {
      "XRequestId": {
        "description": "Quote this when you write to us about the call.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimitPolicy": {
        "description": "The quota and window of this class of call, for example \"reads\";q=300;w=60.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit": {
        "description": "What is left of the quota and when it resets, for example \"reads\";r=250;t=30.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before sending the same request again.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "LedgerPosition": {
        "description": "The position in the ledger's event log after this write. Pass it to listEvents as startPosition to read what followed.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]{1,19}$"
        }
      },
      "Location": {
        "description": "Where to read the record that was created, or the page where a person confirms the act.",
        "schema": {
          "type": "string"
        }
      }
    }
  }
}
