{
  "openapi": "3.1.0",
  "info": {
    "title": "Desktop Books API",
    "version": "1.0.0",
    "summary": "Read-only QuickBooks Desktop data, synced through Intuit's Web Connector.",
    "description": "Every company file syncs through the QuickBooks Web Connector on the office PC. Data is as fresh as the last check-in: each response says when (synced_at, as_of). Send your key as Authorization: Bearer dbk_..., or as HTTP Basic with the key as the user name and an empty password. Never put a key in a URL. 60 requests a minute per key.",
    "contact": {
      "name": "Desktop Books API",
      "email": "hello@greatwork.company",
      "url": "https://desktop-books.greatwork.company/docs"
    }
  },
  "servers": [
    {
      "url": "https://desktop-app.greatwork.company"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "Who the key belongs to and the files it reads."
    },
    {
      "name": "Customers",
      "description": "Customers and jobs. A job is a customer with a parent."
    },
    {
      "name": "Vendors",
      "description": "Vendors and what you owe each one."
    },
    {
      "name": "Items",
      "description": "Products and services, with prices, costs and quantity on hand."
    },
    {
      "name": "Accounts",
      "description": "The chart of accounts with balances."
    },
    {
      "name": "Classes",
      "description": "Classes, for files that track them."
    },
    {
      "name": "Invoices",
      "description": "Invoices with balances, due dates and line items."
    },
    {
      "name": "Sales receipts",
      "description": "Sales paid at the time of sale."
    },
    {
      "name": "Payments",
      "description": "Customer payments and the invoices they paid."
    },
    {
      "name": "Credit memos",
      "description": "Credit memos and what is left on each."
    },
    {
      "name": "Estimates",
      "description": "Estimates, active and closed."
    },
    {
      "name": "Sales orders",
      "description": "Sales orders and whether they're fully invoiced."
    },
    {
      "name": "Bills",
      "description": "Vendor bills with what is still open."
    },
    {
      "name": "Bill payments",
      "description": "Payments to vendors by check or credit card."
    },
    {
      "name": "Purchase orders",
      "description": "Purchase orders and whether they're fully received."
    },
    {
      "name": "Checks",
      "description": "Checks and other money out of bank accounts."
    },
    {
      "name": "Deposits",
      "description": "Bank deposits and what went into each."
    },
    {
      "name": "Journal entries",
      "description": "General journal entries, debit and credit lines."
    },
    {
      "name": "Inventory",
      "description": "Quantity on hand, on order and on sales orders for each inventory item."
    },
    {
      "name": "Reports",
      "description": "Profit and loss, balance sheet, aging and job profitability, as QuickBooks runs them."
    }
  ],
  "paths": {
    "/v1/me": {
      "get": {
        "operationId": "getMe",
        "tags": [
          "Account"
        ],
        "summary": "The key and account",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files": {
      "get": {
        "operationId": "listFiles",
        "tags": [
          "Account"
        ],
        "summary": "Company files this key can read",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/File"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "operationId": "getFile",
        "tags": [
          "Account"
        ],
        "summary": "One company file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "file"
                    },
                    "data": {
                      "$ref": "#/components/schemas/File"
                    },
                    "resources": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "reports": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/status": {
      "get": {
        "operationId": "getFileStatus",
        "tags": [
          "Account"
        ],
        "summary": "Sync health in plain words",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "file_status"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FileStatus"
                    },
                    "as_of": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "synced_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/customers": {
      "get": {
        "operationId": "listCustomers",
        "tags": [
          "Customers"
        ],
        "summary": "List customers",
        "description": "Customers and jobs. A job is a customer with a parent.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "A customer id or name. A customer includes its jobs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "id (default) or modified (default with modified_since).",
            "schema": {
              "type": "string",
              "enum": [
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "customers"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Customers"
                              },
                              {
                                "$ref": "#/components/schemas/CustomersFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/customers/{qb_id}": {
      "get": {
        "operationId": "getCustomerById",
        "tags": [
          "Customers"
        ],
        "summary": "One customer",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "customers"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Customers"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/vendors": {
      "get": {
        "operationId": "listVendors",
        "tags": [
          "Vendors"
        ],
        "summary": "List vendors",
        "description": "Vendors and what you owe each one.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "id (default) or modified (default with modified_since).",
            "schema": {
              "type": "string",
              "enum": [
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "vendors"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Vendors"
                              },
                              {
                                "$ref": "#/components/schemas/VendorsFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/vendors/{qb_id}": {
      "get": {
        "operationId": "getVendorById",
        "tags": [
          "Vendors"
        ],
        "summary": "One vendor",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "vendors"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Vendors"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/items": {
      "get": {
        "operationId": "listItems",
        "tags": [
          "Items"
        ],
        "summary": "List items",
        "description": "Products and services, with prices, costs and quantity on hand.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "id (default) or modified (default with modified_since).",
            "schema": {
              "type": "string",
              "enum": [
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "items"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Items"
                              },
                              {
                                "$ref": "#/components/schemas/ItemsFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/items/{qb_id}": {
      "get": {
        "operationId": "getItemById",
        "tags": [
          "Items"
        ],
        "summary": "One item",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "items"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Items"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/accounts": {
      "get": {
        "operationId": "listAccounts",
        "tags": [
          "Accounts"
        ],
        "summary": "List accounts",
        "description": "The chart of accounts with balances.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "id (default) or modified (default with modified_since).",
            "schema": {
              "type": "string",
              "enum": [
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "accounts"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Accounts"
                              },
                              {
                                "$ref": "#/components/schemas/AccountsFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/accounts/{qb_id}": {
      "get": {
        "operationId": "getAccountById",
        "tags": [
          "Accounts"
        ],
        "summary": "One account",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "accounts"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Accounts"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/classes": {
      "get": {
        "operationId": "listClasses",
        "tags": [
          "Classes"
        ],
        "summary": "List classes",
        "description": "Classes, for files that track them.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "id (default) or modified (default with modified_since).",
            "schema": {
              "type": "string",
              "enum": [
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "classes"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Classes"
                              },
                              {
                                "$ref": "#/components/schemas/ClassesFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/classes/{qb_id}": {
      "get": {
        "operationId": "getClassById",
        "tags": [
          "Classes"
        ],
        "summary": "One class",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "classes"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Classes"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/invoices": {
      "get": {
        "operationId": "listInvoices",
        "tags": [
          "Invoices"
        ],
        "summary": "List invoices",
        "description": "Invoices with balances, due dates and line items.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status. overdue is open and past the due date in the company file's time zone.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "unpaid",
                "paid",
                "closed",
                "overdue",
                "all"
              ]
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "A customer id or name. A customer includes its jobs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "invoices"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Invoices"
                              },
                              {
                                "$ref": "#/components/schemas/InvoicesFlat"
                              },
                              {
                                "$ref": "#/components/schemas/InvoicesLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/invoices/{qb_id}": {
      "get": {
        "operationId": "getInvoiceById",
        "tags": [
          "Invoices"
        ],
        "summary": "One invoice",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "invoices"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Invoices"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/sales-receipts": {
      "get": {
        "operationId": "listSalesReceipts",
        "tags": [
          "Sales receipts"
        ],
        "summary": "List sales receipts",
        "description": "Sales paid at the time of sale.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "A customer id or name. A customer includes its jobs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "sales-receipts"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/SalesReceipts"
                              },
                              {
                                "$ref": "#/components/schemas/SalesReceiptsFlat"
                              },
                              {
                                "$ref": "#/components/schemas/SalesReceiptsLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/sales-receipts/{qb_id}": {
      "get": {
        "operationId": "getSalesReceiptById",
        "tags": [
          "Sales receipts"
        ],
        "summary": "One sales receipt",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "sales-receipts"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SalesReceipts"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/payments": {
      "get": {
        "operationId": "listPayments",
        "tags": [
          "Payments"
        ],
        "summary": "List payments",
        "description": "Customer payments and the invoices they paid.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "unused",
                "open",
                "applied",
                "closed",
                "all"
              ]
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "A customer id or name. A customer includes its jobs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "payments"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Payments"
                              },
                              {
                                "$ref": "#/components/schemas/PaymentsFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/payments/{qb_id}": {
      "get": {
        "operationId": "getPaymentById",
        "tags": [
          "Payments"
        ],
        "summary": "One payment",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "payments"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Payments"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/credit-memos": {
      "get": {
        "operationId": "listCreditMemos",
        "tags": [
          "Credit memos"
        ],
        "summary": "List credit memos",
        "description": "Credit memos and what is left on each.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "remaining",
                "used",
                "closed",
                "all"
              ]
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "A customer id or name. A customer includes its jobs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "credit-memos"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/CreditMemos"
                              },
                              {
                                "$ref": "#/components/schemas/CreditMemosFlat"
                              },
                              {
                                "$ref": "#/components/schemas/CreditMemosLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/credit-memos/{qb_id}": {
      "get": {
        "operationId": "getCreditMemoById",
        "tags": [
          "Credit memos"
        ],
        "summary": "One credit memo",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "credit-memos"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/CreditMemos"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/estimates": {
      "get": {
        "operationId": "listEstimates",
        "tags": [
          "Estimates"
        ],
        "summary": "List estimates",
        "description": "Estimates, active and closed.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "active",
                "closed",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "A customer id or name. A customer includes its jobs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "estimates"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Estimates"
                              },
                              {
                                "$ref": "#/components/schemas/EstimatesFlat"
                              },
                              {
                                "$ref": "#/components/schemas/EstimatesLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/estimates/{qb_id}": {
      "get": {
        "operationId": "getEstimateById",
        "tags": [
          "Estimates"
        ],
        "summary": "One estimate",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "estimates"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Estimates"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/sales-orders": {
      "get": {
        "operationId": "listSalesOrders",
        "tags": [
          "Sales orders"
        ],
        "summary": "List sales orders",
        "description": "Sales orders and whether they're fully invoiced.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "closed",
                "invoiced",
                "all"
              ]
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "A customer id or name. A customer includes its jobs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "sales-orders"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/SalesOrders"
                              },
                              {
                                "$ref": "#/components/schemas/SalesOrdersFlat"
                              },
                              {
                                "$ref": "#/components/schemas/SalesOrdersLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/sales-orders/{qb_id}": {
      "get": {
        "operationId": "getSalesOrderById",
        "tags": [
          "Sales orders"
        ],
        "summary": "One sales order",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "sales-orders"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SalesOrders"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/bills": {
      "get": {
        "operationId": "listBills",
        "tags": [
          "Bills"
        ],
        "summary": "List bills",
        "description": "Vendor bills with what is still open.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status. overdue is open and past the due date in the company file's time zone.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "unpaid",
                "paid",
                "closed",
                "overdue",
                "all"
              ]
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "description": "A vendor id or name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "bills"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Bills"
                              },
                              {
                                "$ref": "#/components/schemas/BillsFlat"
                              },
                              {
                                "$ref": "#/components/schemas/BillsLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/bills/{qb_id}": {
      "get": {
        "operationId": "getBillById",
        "tags": [
          "Bills"
        ],
        "summary": "One bill",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "bills"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Bills"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/bill-payments": {
      "get": {
        "operationId": "listBillPayments",
        "tags": [
          "Bill payments"
        ],
        "summary": "List bill payments",
        "description": "Payments to vendors by check or credit card.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "description": "A vendor id or name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "bill-payments"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/BillPayments"
                              },
                              {
                                "$ref": "#/components/schemas/BillPaymentsFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/bill-payments/{qb_id}": {
      "get": {
        "operationId": "getBillPaymentById",
        "tags": [
          "Bill payments"
        ],
        "summary": "One bill payment",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "bill-payments"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/BillPayments"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/purchase-orders": {
      "get": {
        "operationId": "listPurchaseOrders",
        "tags": [
          "Purchase orders"
        ],
        "summary": "List purchase orders",
        "description": "Purchase orders and whether they're fully received.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "closed",
                "received",
                "all"
              ]
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "description": "A vendor id or name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "purchase-orders"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/PurchaseOrders"
                              },
                              {
                                "$ref": "#/components/schemas/PurchaseOrdersFlat"
                              },
                              {
                                "$ref": "#/components/schemas/PurchaseOrdersLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/purchase-orders/{qb_id}": {
      "get": {
        "operationId": "getPurchaseOrderById",
        "tags": [
          "Purchase orders"
        ],
        "summary": "One purchase order",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "purchase-orders"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/PurchaseOrders"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/checks": {
      "get": {
        "operationId": "listChecks",
        "tags": [
          "Checks"
        ],
        "summary": "List checks",
        "description": "Checks and other money out of bank accounts.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "payee",
            "in": "query",
            "required": false,
            "description": "A payee id or name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "checks"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Checks"
                              },
                              {
                                "$ref": "#/components/schemas/ChecksFlat"
                              },
                              {
                                "$ref": "#/components/schemas/ChecksLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/checks/{qb_id}": {
      "get": {
        "operationId": "getCheckById",
        "tags": [
          "Checks"
        ],
        "summary": "One check",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "checks"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Checks"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/deposits": {
      "get": {
        "operationId": "listDeposits",
        "tags": [
          "Deposits"
        ],
        "summary": "List deposits",
        "description": "Bank deposits and what went into each.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "deposits"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Deposits"
                              },
                              {
                                "$ref": "#/components/schemas/DepositsFlat"
                              },
                              {
                                "$ref": "#/components/schemas/DepositsLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/deposits/{qb_id}": {
      "get": {
        "operationId": "getDepositById",
        "tags": [
          "Deposits"
        ],
        "summary": "One deposit",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "deposits"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Deposits"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/journal-entries": {
      "get": {
        "operationId": "listJournalEntries",
        "tags": [
          "Journal entries"
        ],
        "summary": "List journal entries",
        "description": "General journal entries, debit and credit lines.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Transaction date on or after (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Transaction date on or before (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "date (newest first, default), modified (oldest change first, default with modified_since) or id.",
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "rows",
            "in": "query",
            "required": false,
            "description": "lines gives one row per line item (with format=csv or flat=1).",
            "schema": {
              "type": "string",
              "enum": [
                "records",
                "lines"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "journal-entries"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/JournalEntries"
                              },
                              {
                                "$ref": "#/components/schemas/JournalEntriesFlat"
                              },
                              {
                                "$ref": "#/components/schemas/JournalEntriesLineRow"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/journal-entries/{qb_id}": {
      "get": {
        "operationId": "getJournalEntryById",
        "tags": [
          "Journal entries"
        ],
        "summary": "One journal entry",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "journal-entries"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/JournalEntries"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/inventory": {
      "get": {
        "operationId": "listInventory",
        "tags": [
          "Inventory"
        ],
        "summary": "List inventory",
        "description": "Quantity on hand, on order and on sales orders for each inventory item.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Records per page, 1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page. Keep the other parameters the same while paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modified_since",
            "in": "query",
            "required": false,
            "description": "Only records changed at or after this time (ISO 8601 date-time with offset, or a date).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level fields to return (id is always included).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "id (default) or modified (default with modified_since).",
            "schema": {
              "type": "string",
              "enum": [
                "modified",
                "id"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          },
          {
            "name": "flat",
            "in": "query",
            "required": false,
            "description": "1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "required": [
                        "data",
                        "next_cursor"
                      ],
                      "properties": {
                        "object": {
                          "const": "list"
                        },
                        "resource": {
                          "const": "inventory"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Inventory"
                              },
                              {
                                "$ref": "#/components/schemas/InventoryFlat"
                              }
                            ]
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_more": {
                          "type": "boolean"
                        },
                        "notice": {
                          "type": "string",
                          "description": "On an empty first page only: why it's empty (nothing synced yet, or still arriving)."
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/inventory/{qb_id}": {
      "get": {
        "operationId": "getInventoryLevelById",
        "tags": [
          "Inventory"
        ],
        "summary": "One inventory level",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qb_id",
            "in": "path",
            "required": true,
            "description": "QuickBooks' id for the record (ListID or TxnID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string"
                        },
                        "resource": {
                          "const": "inventory"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Inventory"
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/reports/profit-and-loss": {
      "get": {
        "operationId": "reportProfitAndLoss",
        "tags": [
          "Reports"
        ],
        "summary": "Profit and loss",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Period start (YYYY-MM-DD). Default the start of this year.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Period end (YYYY-MM-DD). Default today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "basis",
            "in": "query",
            "required": false,
            "description": "accrual or cash. Default: the company file's preference.",
            "schema": {
              "type": "string",
              "enum": [
                "accrual",
                "cash"
              ]
            }
          },
          {
            "name": "shape",
            "in": "query",
            "required": false,
            "description": "table (default for JSON), rows (default for CSV) or long.",
            "schema": {
              "type": "string",
              "enum": [
                "table",
                "rows",
                "long"
              ]
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "const": "report"
                        },
                        "report": {
                          "const": "profit-and-loss"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "shape": {
                          "type": "string"
                        },
                        "table": {
                          "$ref": "#/components/schemas/ReportTable"
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/ReportLine"
                              },
                              {
                                "$ref": "#/components/schemas/ReportLong"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/reports/balance-sheet": {
      "get": {
        "operationId": "reportBalanceSheet",
        "tags": [
          "Reports"
        ],
        "summary": "Balance sheet",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Period start (YYYY-MM-DD). Default the start of this year.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Period end (YYYY-MM-DD). Default today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "basis",
            "in": "query",
            "required": false,
            "description": "accrual or cash. Default: the company file's preference.",
            "schema": {
              "type": "string",
              "enum": [
                "accrual",
                "cash"
              ]
            }
          },
          {
            "name": "shape",
            "in": "query",
            "required": false,
            "description": "table (default for JSON), rows (default for CSV) or long.",
            "schema": {
              "type": "string",
              "enum": [
                "table",
                "rows",
                "long"
              ]
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "const": "report"
                        },
                        "report": {
                          "const": "balance-sheet"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "shape": {
                          "type": "string"
                        },
                        "table": {
                          "$ref": "#/components/schemas/ReportTable"
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/ReportLine"
                              },
                              {
                                "$ref": "#/components/schemas/ReportLong"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/reports/ar-aging": {
      "get": {
        "operationId": "reportArAging",
        "tags": [
          "Reports"
        ],
        "summary": "A/R aging summary",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "description": "Aging as of this date (YYYY-MM-DD). Default today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "shape",
            "in": "query",
            "required": false,
            "description": "table (default for JSON), rows (default for CSV) or long.",
            "schema": {
              "type": "string",
              "enum": [
                "table",
                "rows",
                "long"
              ]
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "const": "report"
                        },
                        "report": {
                          "const": "ar-aging"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "shape": {
                          "type": "string"
                        },
                        "table": {
                          "$ref": "#/components/schemas/ReportTable"
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/ReportLine"
                              },
                              {
                                "$ref": "#/components/schemas/ReportLong"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/reports/ap-aging": {
      "get": {
        "operationId": "reportApAging",
        "tags": [
          "Reports"
        ],
        "summary": "A/P aging summary",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "description": "Aging as of this date (YYYY-MM-DD). Default today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "shape",
            "in": "query",
            "required": false,
            "description": "table (default for JSON), rows (default for CSV) or long.",
            "schema": {
              "type": "string",
              "enum": [
                "table",
                "rows",
                "long"
              ]
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "const": "report"
                        },
                        "report": {
                          "const": "ap-aging"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "shape": {
                          "type": "string"
                        },
                        "table": {
                          "$ref": "#/components/schemas/ReportTable"
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/ReportLine"
                              },
                              {
                                "$ref": "#/components/schemas/ReportLong"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/reports/job-profitability": {
      "get": {
        "operationId": "reportJobProfitability",
        "tags": [
          "Reports"
        ],
        "summary": "Job profitability summary",
        "description": "QuickBooks' job profitability summary. A QuickBooks edition without this report answers with a plain error saying so.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Period start (YYYY-MM-DD). Default the start of this year.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Period end (YYYY-MM-DD). Default today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "basis",
            "in": "query",
            "required": false,
            "description": "accrual or cash. Default: the company file's preference.",
            "schema": {
              "type": "string",
              "enum": [
                "accrual",
                "cash"
              ]
            }
          },
          {
            "name": "shape",
            "in": "query",
            "required": false,
            "description": "table (default for JSON), rows (default for CSV) or long.",
            "schema": {
              "type": "string",
              "enum": [
                "table",
                "rows",
                "long"
              ]
            }
          },
          {
            "name": "if_queued",
            "in": "query",
            "required": false,
            "description": "error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in).",
            "schema": {
              "type": "string",
              "enum": [
                "error"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default) or csv. Accept: text/csv works too.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Freshness"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "const": "report"
                        },
                        "report": {
                          "const": "job-profitability"
                        },
                        "file_id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "shape": {
                          "type": "string"
                        },
                        "table": {
                          "$ref": "#/components/schemas/ReportTable"
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/ReportLine"
                              },
                              {
                                "$ref": "#/components/schemas/ReportLong"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "tags": [
          "Account"
        ],
        "summary": "The answer to a queued read",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "description": "job_id from a queued answer.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/power-query/{name}": {
      "get": {
        "operationId": "getPowerQuery",
        "tags": [
          "Account"
        ],
        "summary": "A Power Query (M) recipe for Excel or Power BI",
        "description": "The query holds no key. The first refresh asks for a credential: choose Basic, paste your key as the user name, leave the password empty.",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "The company file id (file_...), from GET /v1/files.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "A resource or a report name.",
            "schema": {
              "type": "string",
              "enum": [
                "customers",
                "vendors",
                "items",
                "accounts",
                "classes",
                "invoices",
                "sales-receipts",
                "payments",
                "credit-memos",
                "estimates",
                "sales-orders",
                "bills",
                "bill-payments",
                "purchase-orders",
                "checks",
                "deposits",
                "journal-entries",
                "inventory",
                "profit-and-loss",
                "balance-sheet",
                "ar-aging",
                "ap-aging",
                "job-profitability"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "M code",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter isn't valid, or the key was put in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such company file, record or job for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests a minute with this key. Retry-After says when to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "dbk_ key",
        "description": "Authorization: Bearer dbk_..."
      },
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "The key as the user name, an empty password. Excel and Power BI keep it in their credential store."
      }
    },
    "schemas": {
      "Ref": {
        "type": "object",
        "description": "A reference to another QuickBooks record.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ListID or TxnID."
          },
          "name": {
            "type": "string",
            "description": "FullName."
          }
        }
      },
      "Address": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        }
      },
      "AppliedTo": {
        "type": "object",
        "properties": {
          "txnId": {
            "type": "string",
            "description": "The invoice or bill it was applied to."
          },
          "amount": {
            "type": "number"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "hint"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string",
                "description": "What went wrong, in plain words."
              },
              "hint": {
                "type": "string",
                "description": "What to do about it."
              }
            }
          }
        }
      },
      "Queued": {
        "type": "object",
        "required": [
          "status",
          "job_id",
          "ready_after",
          "message"
        ],
        "properties": {
          "status": {
            "const": "queued"
          },
          "job_id": {
            "type": "string"
          },
          "ready_after": {
            "type": "string",
            "format": "date-time",
            "description": "When the next Web Connector check-in is expected."
          },
          "message": {
            "type": "string"
          },
          "poll": {
            "type": "string",
            "description": "Where the answer will be."
          }
        }
      },
      "Freshness": {
        "type": "object",
        "properties": {
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this data last finished syncing from QuickBooks."
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The latest Web Connector check-in that changed this data."
          }
        }
      },
      "File": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting",
              "syncing",
              "ok",
              "error",
              "paused"
            ]
          },
          "keep_copy": {
            "type": "boolean",
            "description": "false for no-copy files: reads are answered at the next check-in."
          },
          "run_every_minutes": {
            "type": "integer"
          },
          "last_checkin_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_success_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "quickbooks": {
            "type": "object",
            "properties": {
              "product": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "qbxml_version": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "web_connector_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Records held per resource."
          }
        }
      },
      "FileStatus": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "description": "One plain sentence about the file's health."
          },
          "lastCheckinAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastSuccessAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextCheckinAfter": {
            "type": [
              "string",
              "null"
            ]
          },
          "stale": {
            "type": "boolean"
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "qbProduct": {
            "type": [
              "string",
              "null"
            ]
          },
          "qbwcVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "keepCopy": {
            "type": "boolean"
          },
          "activeSession": {
            "type": "boolean"
          }
        }
      },
      "Me": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": "string"
              }
            }
          },
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "prefix": {
                "type": "string"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "file",
                  "account"
                ]
              },
              "file_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": "string"
              }
            }
          },
          "files": {
            "type": "integer"
          }
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "object": {
            "const": "job"
          },
          "id": {
            "type": "string"
          },
          "file_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "failed"
            ]
          },
          "ready_after": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "data": {
            "description": "The answer, once status is done: the same shape the original request would have returned."
          },
          "error": {
            "$ref": "#/components/schemas/Error/properties/error"
          }
        }
      },
      "ReportTable": {
        "type": "object",
        "description": "A report as QuickBooks lays it out.",
        "properties": {
          "title": {
            "type": "string"
          },
          "basis": {
            "type": "string",
            "enum": [
              "accrual",
              "cash"
            ]
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "data",
                    "subtotal",
                    "total",
                    "text"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "depth": {
                  "type": "integer"
                },
                "cells": {
                  "type": "array",
                  "items": {
                    "type": [
                      "string",
                      "number",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "ReportLine": {
        "type": "object",
        "description": "One report line with a stable key per column (shape=rows). Aging: current, days_1_30, days_31_60, days_61_90, over_90, total. Job profitability: cost, revenue, difference, percent_difference. Other columns: the title in snake_case (Total is total).",
        "properties": {
          "top": {
            "type": "string",
            "description": "The top heading, or the line itself when nothing is above it (the customer on aging and job reports)."
          },
          "section": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "description": "Income, Cost of Goods Sold, Expense, Other Income, Other Expense, or the balance sheet section."
          },
          "group": {
            "type": "string",
            "description": "The heading right above the line."
          },
          "path": {
            "type": "string",
            "description": "Every heading above the line and the line, joined with ' > '."
          },
          "line": {
            "type": "string"
          },
          "depth": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "data",
              "subtotal",
              "total"
            ]
          }
        },
        "additionalProperties": {
          "type": [
            "number",
            "string",
            "null"
          ]
        }
      },
      "ReportLong": {
        "type": "object",
        "description": "One row per report line and column (shape=long). On a report by month the TOTAL column is left out, so summing amount never counts anything twice.",
        "properties": {
          "top": {
            "type": "string"
          },
          "section": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "line": {
            "type": "string"
          },
          "depth": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "column": {
            "type": "string",
            "description": "The column title as QuickBooks shows it."
          },
          "column_key": {
            "type": "string"
          },
          "month": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The first day of the column's month, or of the report period when the report has one total column."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "x-csv-columns": [
          "top",
          "section",
          "category",
          "group",
          "path",
          "line",
          "depth",
          "kind",
          "column",
          "column_key",
          "month",
          "amount"
        ]
      },
      "Customers": {
        "type": "object",
        "description": "Customers and jobs. A job is a customer with a parent.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job name."
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "isActive": {
            "type": "boolean",
            "description": "False when the customer is inactive in QuickBooks."
          },
          "parent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a job, the customer it belongs to."
          },
          "isJob": {
            "type": "boolean",
            "description": "True for jobs (customers with a parent)."
          },
          "companyName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main email address."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main phone number."
          },
          "billAddress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "The billing address. Address: line1, line2, city, state, postalCode, country."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What this customer or job owes, not counting its jobs."
          },
          "totalBalance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What this customer owes, including its jobs."
          },
          "jobStatus": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Awarded",
              "Closed",
              "InProgress",
              "None",
              "NotAwarded",
              "Pending",
              null
            ],
            "description": "The job status for jobs, in QuickBooks' own words: Awarded, Closed, InProgress, None, NotAwarded or Pending."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          }
        }
      },
      "CustomersFlat": {
        "type": "object",
        "description": "A customer as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job name."
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "False when the customer is inactive in QuickBooks."
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a job, the customer it belongs to. (its QuickBooks id)"
          },
          "parent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a job, the customer it belongs to. (its name)"
          },
          "is_job": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for jobs (customers with a parent)."
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main email address."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main phone number."
          },
          "bill_address_line1": {
            "type": [
              "string",
              "null"
            ],
            "description": "The billing address: line1."
          },
          "bill_address_line2": {
            "type": [
              "string",
              "null"
            ],
            "description": "The billing address: line2."
          },
          "bill_address_city": {
            "type": [
              "string",
              "null"
            ],
            "description": "The billing address: city."
          },
          "bill_address_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "The billing address: state."
          },
          "bill_address_postal_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The billing address: postal code."
          },
          "bill_address_country": {
            "type": [
              "string",
              "null"
            ],
            "description": "The billing address: country."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What this customer or job owes, not counting its jobs."
          },
          "total_balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What this customer owes, including its jobs."
          },
          "job_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The job status for jobs, in QuickBooks' own words: Awarded, Closed, InProgress, None, NotAwarded or Pending."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "name",
          "full_name",
          "is_active",
          "parent_id",
          "parent_name",
          "is_job",
          "company_name",
          "email",
          "phone",
          "bill_address_line1",
          "bill_address_line2",
          "bill_address_city",
          "bill_address_state",
          "bill_address_postal_code",
          "bill_address_country",
          "balance",
          "total_balance",
          "job_status",
          "currency"
        ]
      },
      "Vendors": {
        "type": "object",
        "description": "Vendors and what you owe each one.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor name."
          },
          "isActive": {
            "type": "boolean",
            "description": "False when the vendor is inactive."
          },
          "companyName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main email address."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main phone number."
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor address. Address: line1, line2, city, state, postalCode, country."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What you owe this vendor."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          }
        }
      },
      "VendorsFlat": {
        "type": "object",
        "description": "A vendor as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor name."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "False when the vendor is inactive."
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main email address."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main phone number."
          },
          "address_line1": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor address: line1."
          },
          "address_line2": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor address: line2."
          },
          "address_city": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor address: city."
          },
          "address_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor address: state."
          },
          "address_postal_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor address: postal code."
          },
          "address_country": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor address: country."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What you owe this vendor."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "name",
          "is_active",
          "company_name",
          "email",
          "phone",
          "address_line1",
          "address_line2",
          "address_city",
          "address_state",
          "address_postal_code",
          "address_country",
          "balance",
          "currency"
        ]
      },
      "Items": {
        "type": "object",
        "description": "Products and services, with prices, costs and quantity on hand.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item name."
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "service",
              "inventory",
              "inventory_assembly",
              "non_inventory",
              "other_charge",
              "discount",
              "subtotal",
              "group",
              "payment",
              "sales_tax",
              "sales_tax_group",
              null
            ],
            "description": "The item type."
          },
          "isActive": {
            "type": "boolean",
            "description": "False when the item is inactive."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sales description."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "The sales price."
          },
          "cost": {
            "type": [
              "number",
              "null"
            ],
            "description": "The purchase cost."
          },
          "quantityOnHand": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on hand, for inventory items."
          },
          "incomeAccount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The income account."
          },
          "expenseAccount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expense or cost of goods sold account."
          }
        }
      },
      "ItemsFlat": {
        "type": "object",
        "description": "A item as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item name."
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item type."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "False when the item is inactive."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sales description."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "The sales price."
          },
          "cost": {
            "type": [
              "number",
              "null"
            ],
            "description": "The purchase cost."
          },
          "quantity_on_hand": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on hand, for inventory items."
          },
          "income_account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The income account. (its QuickBooks id)"
          },
          "income_account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The income account. (its name)"
          },
          "expense_account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense or cost of goods sold account. (its QuickBooks id)"
          },
          "expense_account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense or cost of goods sold account. (its name)"
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "name",
          "full_name",
          "type",
          "is_active",
          "description",
          "price",
          "cost",
          "quantity_on_hand",
          "income_account_id",
          "income_account_name",
          "expense_account_id",
          "expense_account_name"
        ]
      },
      "Accounts": {
        "type": "object",
        "description": "The chart of accounts with balances.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account name."
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account type as QuickBooks names it (Bank, AccountsReceivable, Income...)."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account number, when account numbers are turned on."
          },
          "isActive": {
            "type": "boolean",
            "description": "False when the account is inactive."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "The account balance."
          }
        }
      },
      "AccountsFlat": {
        "type": "object",
        "description": "A account as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account name."
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account type as QuickBooks names it (Bank, AccountsReceivable, Income...)."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account number, when account numbers are turned on."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "False when the account is inactive."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "The account balance."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "name",
          "full_name",
          "type",
          "number",
          "is_active",
          "balance"
        ]
      },
      "Classes": {
        "type": "object",
        "description": "Classes, for files that track them.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class name."
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "isActive": {
            "type": "boolean",
            "description": "False when the class is inactive."
          }
        }
      },
      "ClassesFlat": {
        "type": "object",
        "description": "A class as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class name."
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full name, including parents (Customer:Job, Parent:Item)."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "False when the class is inactive."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "name",
          "full_name",
          "is_active"
        ]
      },
      "InvoicesLine": {
        "type": "object",
        "description": "A line on a invoice.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          }
        }
      },
      "Invoices": {
        "type": "object",
        "description": "Invoices with balances, due dates and line items.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer or job, as { id, name }."
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When payment is due (YYYY-MM-DD)."
          },
          "subtotal": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total before sales tax."
          },
          "tax": {
            "type": [
              "number",
              "null"
            ],
            "description": "Sales tax."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "applied": {
            "type": [
              "number",
              "null"
            ],
            "description": "Payments and credits applied so far, as a positive number."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What is still owed."
          },
          "isPaid": {
            "type": "boolean",
            "description": "True when nothing is left to pay."
          },
          "terms": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment terms, such as Net 30."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the invoice."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "paid",
              "open",
              "overdue",
              null
            ],
            "description": "paid, open, or overdue (open and past the due date). Computed by Desktop Books when the record is read."
          },
          "daysOverdue": {
            "type": "integer",
            "description": "Days past the due date while a balance is open, counted in the company file's time zone. 0 when nothing is overdue. Computed by Desktop Books when the record is read."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoicesLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "InvoicesFlat": {
        "type": "object",
        "description": "A invoice as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When payment is due (YYYY-MM-DD)."
          },
          "subtotal": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total before sales tax."
          },
          "tax": {
            "type": [
              "number",
              "null"
            ],
            "description": "Sales tax."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "applied": {
            "type": [
              "number",
              "null"
            ],
            "description": "Payments and credits applied so far, as a positive number."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "What is still owed."
          },
          "is_paid": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when nothing is left to pay."
          },
          "terms_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Payment terms, such as Net 30. (its QuickBooks id)"
          },
          "terms_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Payment terms, such as Net 30. (its name)"
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the invoice. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the invoice. (its name)"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "paid, open, or overdue (open and past the due date)."
          },
          "days_overdue": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Days past the due date while a balance is open, counted in the company file's time zone. 0 when nothing is overdue."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "customer_id",
          "customer_name",
          "due_date",
          "subtotal",
          "tax",
          "total",
          "applied",
          "balance",
          "is_paid",
          "terms_id",
          "terms_name",
          "class_id",
          "class_name",
          "status",
          "days_overdue",
          "line_count"
        ]
      },
      "InvoicesLineRow": {
        "type": "object",
        "description": "One line of a invoice as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "customer_id",
          "customer_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name"
        ]
      },
      "SalesReceiptsLine": {
        "type": "object",
        "description": "A line on a sales receipt.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          }
        }
      },
      "SalesReceipts": {
        "type": "object",
        "description": "Sales paid at the time of sale.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer or job, as { id, name }."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "depositTo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the money went to."
          },
          "paymentMethod": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "How it was paid."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesReceiptsLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "SalesReceiptsFlat": {
        "type": "object",
        "description": "A sales receipt as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "deposit_to_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the money went to. (its QuickBooks id)"
          },
          "deposit_to_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the money went to. (its name)"
          },
          "payment_method_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it was paid. (its QuickBooks id)"
          },
          "payment_method_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it was paid. (its name)"
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "customer_id",
          "customer_name",
          "total",
          "deposit_to_id",
          "deposit_to_name",
          "payment_method_id",
          "payment_method_name",
          "line_count"
        ]
      },
      "SalesReceiptsLineRow": {
        "type": "object",
        "description": "One line of a sales receipt as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "customer_id",
          "customer_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name"
        ]
      },
      "Payments": {
        "type": "object",
        "description": "Customer payments and the invoices they paid.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer or job, as { id, name }."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The payment amount."
          },
          "paymentMethod": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "How it was paid."
          },
          "depositTo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the money went to."
          },
          "unusedAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The part of the payment not applied to any invoice yet."
          },
          "appliedTo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppliedTo"
            },
            "description": "The transactions this payment was applied to, as { txnId, amount }."
          }
        }
      },
      "PaymentsFlat": {
        "type": "object",
        "description": "A payment as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The payment amount."
          },
          "payment_method_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it was paid. (its QuickBooks id)"
          },
          "payment_method_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it was paid. (its name)"
          },
          "deposit_to_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the money went to. (its QuickBooks id)"
          },
          "deposit_to_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the money went to. (its name)"
          },
          "unused_amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The part of the payment not applied to any invoice yet."
          },
          "applied_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many transactions it was applied to."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "customer_id",
          "customer_name",
          "amount",
          "payment_method_id",
          "payment_method_name",
          "deposit_to_id",
          "deposit_to_name",
          "unused_amount",
          "applied_count"
        ]
      },
      "CreditMemosLine": {
        "type": "object",
        "description": "A line on a credit memo.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          }
        }
      },
      "CreditMemos": {
        "type": "object",
        "description": "Credit memos and what is left on each.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer or job, as { id, name }."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "remaining": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit not used yet."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditMemosLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "CreditMemosFlat": {
        "type": "object",
        "description": "A credit memo as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "remaining": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit not used yet."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "customer_id",
          "customer_name",
          "total",
          "remaining",
          "line_count"
        ]
      },
      "CreditMemosLineRow": {
        "type": "object",
        "description": "One line of a credit memo as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "customer_id",
          "customer_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name"
        ]
      },
      "EstimatesLine": {
        "type": "object",
        "description": "A line on a estimate.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          }
        }
      },
      "Estimates": {
        "type": "object",
        "description": "Estimates, active and closed.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer or job, as { id, name }."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "isActive": {
            "type": "boolean",
            "description": "False once the estimate is closed."
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the estimate expires, when set."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EstimatesLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "EstimatesFlat": {
        "type": "object",
        "description": "A estimate as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "False once the estimate is closed."
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the estimate expires, when set."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "customer_id",
          "customer_name",
          "total",
          "is_active",
          "due_date",
          "line_count"
        ]
      },
      "EstimatesLineRow": {
        "type": "object",
        "description": "One line of a estimate as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "customer_id",
          "customer_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name"
        ]
      },
      "SalesOrdersLine": {
        "type": "object",
        "description": "A line on a sales order.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          }
        }
      },
      "SalesOrders": {
        "type": "object",
        "description": "Sales orders and whether they're fully invoiced.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer or job, as { id, name }."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "isFullyInvoiced": {
            "type": "boolean",
            "description": "True once every line is invoiced."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesOrdersLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "SalesOrdersFlat": {
        "type": "object",
        "description": "A sales order as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "is_fully_invoiced": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True once every line is invoiced."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "customer_id",
          "customer_name",
          "total",
          "is_fully_invoiced",
          "line_count"
        ]
      },
      "SalesOrdersLineRow": {
        "type": "object",
        "description": "One line of a sales order as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its QuickBooks id)"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer or job. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "customer_id",
          "customer_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name"
        ]
      },
      "BillsLine": {
        "type": "object",
        "description": "A line on a bill.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expense account, for expense lines."
          }
        }
      },
      "Bills": {
        "type": "object",
        "description": "Vendor bills with what is still open.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "vendor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor, as { id, name }."
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When payment is due (YYYY-MM-DD)."
          },
          "amountDue": {
            "type": [
              "number",
              "null"
            ],
            "description": "The bill amount."
          },
          "openAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "What is still unpaid."
          },
          "isPaid": {
            "type": "boolean",
            "description": "True when nothing is left to pay."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "paid",
              "open",
              "overdue",
              null
            ],
            "description": "paid, open, or overdue (open and past the due date). Computed by Desktop Books when the record is read."
          },
          "daysOverdue": {
            "type": "integer",
            "description": "Days past the due date while a balance is open, counted in the company file's time zone. 0 when nothing is overdue. Computed by Desktop Books when the record is read."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillsLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "BillsFlat": {
        "type": "object",
        "description": "A bill as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its QuickBooks id)"
          },
          "vendor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its name)"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When payment is due (YYYY-MM-DD)."
          },
          "amount_due": {
            "type": [
              "number",
              "null"
            ],
            "description": "The bill amount."
          },
          "open_amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "What is still unpaid."
          },
          "is_paid": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when nothing is left to pay."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "paid, open, or overdue (open and past the due date)."
          },
          "days_overdue": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Days past the due date while a balance is open, counted in the company file's time zone. 0 when nothing is overdue."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "vendor_id",
          "vendor_name",
          "due_date",
          "amount_due",
          "open_amount",
          "is_paid",
          "status",
          "days_overdue",
          "line_count"
        ]
      },
      "BillsLineRow": {
        "type": "object",
        "description": "One line of a bill as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its QuickBooks id)"
          },
          "vendor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense account, for expense lines. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense account, for expense lines. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "vendor_id",
          "vendor_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name",
          "account_id",
          "account_name"
        ]
      },
      "BillPayments": {
        "type": "object",
        "description": "Payments to vendors by check or credit card.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "vendor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor, as { id, name }."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The payment amount."
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "check",
              "credit_card",
              null
            ],
            "description": "check or credit_card."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bank or credit card account it was paid from."
          },
          "appliedTo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppliedTo"
            },
            "description": "The transactions this payment was applied to, as { txnId, amount }."
          }
        }
      },
      "BillPaymentsFlat": {
        "type": "object",
        "description": "A bill payment as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its QuickBooks id)"
          },
          "vendor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its name)"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The payment amount."
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "description": "check or credit_card."
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The bank or credit card account it was paid from. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The bank or credit card account it was paid from. (its name)"
          },
          "applied_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many transactions it was applied to."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "vendor_id",
          "vendor_name",
          "amount",
          "method",
          "account_id",
          "account_name",
          "applied_count"
        ]
      },
      "PurchaseOrdersLine": {
        "type": "object",
        "description": "A line on a purchase order.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expense account, for expense lines."
          }
        }
      },
      "PurchaseOrders": {
        "type": "object",
        "description": "Purchase orders and whether they're fully received.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "vendor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vendor, as { id, name }."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "isFullyReceived": {
            "type": "boolean",
            "description": "True once everything is received."
          },
          "expectedDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the order is expected."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseOrdersLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "PurchaseOrdersFlat": {
        "type": "object",
        "description": "A purchase order as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its QuickBooks id)"
          },
          "vendor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its name)"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "is_fully_received": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True once everything is received."
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "When the order is expected."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "vendor_id",
          "vendor_name",
          "total",
          "is_fully_received",
          "expected_date",
          "line_count"
        ]
      },
      "PurchaseOrdersLineRow": {
        "type": "object",
        "description": "One line of a purchase order as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its QuickBooks id)"
          },
          "vendor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense account, for expense lines. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense account, for expense lines. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "vendor_id",
          "vendor_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name",
          "account_id",
          "account_name"
        ]
      },
      "ChecksLine": {
        "type": "object",
        "description": "A line on a check.",
        "required": [],
        "properties": {
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The item, as { id, name }."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line, when classes are turned on."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expense account, for expense lines."
          }
        }
      },
      "Checks": {
        "type": "object",
        "description": "Checks and other money out of bank accounts.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "payee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the check is to."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The bank account it was written from."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The check amount."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChecksLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "ChecksFlat": {
        "type": "object",
        "description": "A check as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "payee_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who the check is to. (its QuickBooks id)"
          },
          "payee_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who the check is to. (its name)"
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The bank account it was written from. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The bank account it was written from. (its name)"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The check amount."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "payee_id",
          "payee_name",
          "account_id",
          "account_name",
          "amount",
          "line_count"
        ]
      },
      "ChecksLineRow": {
        "type": "object",
        "description": "One line of a check as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "payee_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who the check is to. (its QuickBooks id)"
          },
          "payee_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who the check is to. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item. (its name)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line's description."
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity."
          },
          "rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per unit."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line, when classes are turned on. (its name)"
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense account, for expense lines. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The expense account, for expense lines. (its name)"
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "payee_id",
          "payee_name",
          "line",
          "item_id",
          "item_name",
          "description",
          "quantity",
          "rate",
          "amount",
          "class_id",
          "class_name",
          "account_id",
          "account_name"
        ]
      },
      "DepositsLine": {
        "type": "object",
        "description": "A line on a deposit.",
        "required": [],
        "properties": {
          "from": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the money came from."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the line comes from."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line memo."
          }
        }
      },
      "Deposits": {
        "type": "object",
        "description": "Bank deposits and what went into each.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account the deposit went to."
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepositsLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "DepositsFlat": {
        "type": "object",
        "description": "A deposit as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the deposit went to. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the deposit went to. (its name)"
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total amount, in the transaction's currency."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "account_id",
          "account_name",
          "total",
          "line_count"
        ]
      },
      "DepositsLineRow": {
        "type": "object",
        "description": "One line of a deposit as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the line comes from. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account the line comes from. (its name)"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "from_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who the money came from. (its QuickBooks id)"
          },
          "from_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who the money came from. (its name)"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The line amount."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line memo."
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "account_id",
          "account_name",
          "line",
          "from_id",
          "from_name",
          "account_id",
          "account_name",
          "amount",
          "memo"
        ]
      },
      "JournalEntriesLine": {
        "type": "object",
        "description": "A line on a journal entry.",
        "required": [],
        "properties": {
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "debit",
              "credit",
              null
            ],
            "description": "debit or credit."
          },
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The account."
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The amount, always positive; type says which side."
          },
          "entity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer, vendor or other name on the line."
          },
          "class": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The class on the line."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line memo."
          }
        }
      },
      "JournalEntries": {
        "type": "object",
        "description": "General journal entries, debit and credit lines.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "editSequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "isAdjustment": {
            "type": "boolean",
            "description": "True for adjusting entries."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEntriesLine"
            },
            "description": "Line items: item, description, quantity, rate, amount, class."
          }
        }
      },
      "JournalEntriesFlat": {
        "type": "object",
        "description": "A journal entry as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "edit_sequence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changes every time the record is edited in QuickBooks."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record was created, with the company file's time offset."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The memo field."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code, when the company file uses multiple currencies."
          },
          "exchange_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Exchange rate to the home currency, when the company file uses multiple currencies."
          },
          "is_adjustment": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for adjusting entries."
          },
          "line_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many line items the record has."
          }
        },
        "x-csv-columns": [
          "id",
          "edit_sequence",
          "created_at",
          "modified_at",
          "number",
          "date",
          "memo",
          "currency",
          "exchange_rate",
          "is_adjustment",
          "line_count"
        ]
      },
      "JournalEntriesLineRow": {
        "type": "object",
        "description": "One line of a journal entry as a flat row (rows=lines).",
        "properties": {
          "txn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "QuickBooks' own id (ListID for lists, TxnID for transactions)."
          },
          "txn_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number people see (invoice number, check number)."
          },
          "txn_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The transaction date (YYYY-MM-DD)."
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The line's position on the transaction, starting at 1."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "debit or credit."
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account. (its QuickBooks id)"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account. (its name)"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The amount, always positive; type says which side."
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer, vendor or other name on the line. (its QuickBooks id)"
          },
          "entity_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer, vendor or other name on the line. (its name)"
          },
          "class_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line. (its QuickBooks id)"
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The class on the line. (its name)"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line memo."
          }
        },
        "x-csv-columns": [
          "txn_id",
          "txn_number",
          "txn_date",
          "line",
          "type",
          "account_id",
          "account_name",
          "amount",
          "entity_id",
          "entity_name",
          "class_id",
          "class_name",
          "memo"
        ]
      },
      "Inventory": {
        "type": "object",
        "description": "Quantity on hand, on order and on sales orders for each inventory item.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item's QuickBooks id (ListID)."
          },
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "description": "The inventory item."
          },
          "quantityOnHand": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on hand."
          },
          "quantityOnOrder": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on open purchase orders."
          },
          "quantityOnSalesOrder": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on open sales orders."
          },
          "averageCost": {
            "type": [
              "number",
              "null"
            ],
            "description": "Average cost per unit."
          },
          "value": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on hand times average cost."
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          }
        }
      },
      "InventoryFlat": {
        "type": "object",
        "description": "A inventory level as one flat row (CSV and flat=1).",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item's QuickBooks id (ListID)."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The inventory item. (its QuickBooks id)"
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The inventory item. (its name)"
          },
          "quantity_on_hand": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on hand."
          },
          "quantity_on_order": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on open purchase orders."
          },
          "quantity_on_sales_order": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on open sales orders."
          },
          "average_cost": {
            "type": [
              "number",
              "null"
            ],
            "description": "Average cost per unit."
          },
          "value": {
            "type": [
              "number",
              "null"
            ],
            "description": "Quantity on hand times average cost."
          },
          "modified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record last changed. Use modified_since to read only what changed."
          }
        },
        "x-csv-columns": [
          "id",
          "item_id",
          "item_name",
          "quantity_on_hand",
          "quantity_on_order",
          "quantity_on_sales_order",
          "average_cost",
          "value",
          "modified_at"
        ]
      }
    }
  }
}