openapi: 3.0.3
info:
  version: 10.24.32
  title: Accounting API
  description: "Welcome to the Accounting API.\n\nYou can use this API to access all Accounting API endpoints.\n\n## Base URL\n\nThe base URL for all API requests is `https://unify.apideck.com`\n\n## Headers\n\nCustom headers that are expected as part of the request. Note that [RFC7230](https://tools.ietf.org/html/rfc7230) states header names are case insensitive.\n\n| Name                  | Type    | Required | Description                                                                                                                                                    |\n| --------------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| x-apideck-consumer-id | String  | Yes      | The id of the customer stored inside Apideck Vault. This can be a user id, account id, device id or whatever entity that can have integration within your app. |\n| x-apideck-service-id  | String  | No       | Describe the service you want to call (e.g., pipedrive). Only needed when a customer has activated multiple integrations for the same Unified API.             |\n| x-apideck-app-id      | String  | Yes      | The application id of your Unify application. Available at https://app.apideck.com/unify/api-keys.                                                             |\n| Authorization         | String  | Yes      | Bearer <token> KEY                                                                                                                                                 |\n\n## Authorization\n\nYou can interact with the API through the authorization methods below.\n\n<!-- ReDoc-Inject: <security-definitions> -->\n\n## Pagination\n\nAll API resources have support for bulk retrieval via list APIs.  Apideck uses cursor-based pagination via the optional `cursor` and `limit` parameters.\n\nTo fetch the first page of results, call the list API without a `cursor` parameter. Afterwards you can fetch subsequent pages by providing a cursor parameter. You will find the next cursor in the response body in `meta.cursors.next`. If `meta.cursors.next` is `null` you're at the end of the list.\n\nIn the REST API you can also use the `links` from the response for added convenience. Simply call the URL in `links.next` to get the next page of results.\n\n### Query Parameters\n\n| Name   | Type   | Required | Description                                                                                                        |\n| ------ | ------ | -------- | ------------------------------------------------------------------------------------------------------------------ |\n| cursor | String | No       | Cursor to start from. You can find cursors for next & previous pages in the meta.cursors property of the response. |\n| limit  | Number | No       | Number of results to return. Minimum 1, Maximum 200, Default 20                                                    |\n\n### Response Body\n\n| Name                  | Type   | Description                                                        |\n| --------------------- | ------ | ------------------------------------------------------------------ |\n| meta.cursors.previous | String | Cursor to navigate to the previous page of results through the API |\n| meta.cursors.current  | String | Cursor to navigate to the current page of results through the API  |\n| meta.cursors.next     | String | Cursor to navigate to the next page of results through the API     |\n| meta.items_on_page    | Number | Number of items returned in the data property of the response      |\n| links.previous        | String | Link to navigate to the previous page of results through the API   |\n| links.current         | String | Link to navigate to the current page of results through the API    |\n| links.next            | String | Link to navigate to the next page of results through the API       |\n\n⚠️ `meta.cursors.previous`/`links.previous` is not available for all connectors.\n\n## SDKs and API Clients\n\nWe currently offer a [Node.js](https://developers.apideck.com/sdks/node), [PHP](https://developers.apideck.com/sdks/php), [Python](https://developers.apideck.com/sdks/python) and [.NET](https://developers.apideck.com/sdks/dot-net) SDK.\nNeed another SDK? [Request the SDK of your choice](https://requests.apideck.io/request).\n\n## Debugging\n\nBecause of the nature of the abstraction we do in Apideck Unify we still provide the option to the receive raw requests and responses being handled underlying. By including the raw flag `?raw=true` in your requests you can still receive the full request. Please note that this increases the response size and can introduce extra latency.\n\n## Errors\n\nThe API returns standard HTTP response codes to indicate success or failure of the API requests. For errors, we also return a customized error message inside the JSON response. You can see the returned HTTP status codes below.\n\n| Code | Title                | Description                                                                                                                                                                                              |\n| ---- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 200  | OK                   | The request message has been successfully processed, and it has produced a response. The response message varies, depending on the request method and the requested data.                                |\n| 201  | Created              | The request has been fulfilled and has resulted in one or more new resources being created.                                                                                                              |\n| 204  | No Content           | The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.                                                                          |\n| 400  | Bad Request          | The receiving server cannot understand the request because of malformed syntax. Do not repeat the request without first modifying it; check the request for errors, fix them and then retry the request. |\n| 401  | Unauthorized         | The request has not been applied because it lacks valid authentication credentials for the target resource.                                                                                              |\n| 402  | Payment Required     | Subscription data is incomplete or out of date. You'll need to provide payment details to continue.                                                                                                      |\n| 403  | Forbidden            | You do not have the appropriate user rights to access the request. Do not repeat the request.                                                                                                            |\n| 404  | Not Found            | The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.                                                                           |\n| 409  | Conflict             | The request could not be completed due to a conflict with the current state of the target resource.                                                                                                      |\n| 422  | Unprocessable Entity | The server understands the content type of the request entity, and the syntax of the request entity is correct but was unable to process the contained instructions.                                     |\n| 429  | Too Many Requests    | You sent too many requests in a given amount of time (\"rate limit\"). Try again later                                                                                                                     |\n| 5xx  | Server Errors        | Something went wrong with the Unify API. These errors are logged on our side. You can contact our team to resolve the issue.                                                                             |\n\n### Handling errors\n\nThe Unify API and SDKs can produce errors for many reasons, such as a failed requests due to misconfigured integrations, invalid parameters, authentication errors, and network unavailability.\n\n### Error Types\n\n#### RequestValidationError\n\nRequest is not valid for the current endpoint. The response body will include details on the validation error. Check the spelling and types of your attributes, and ensure you are not passing data that is outside of the specification.\n\n#### UnsupportedFiltersError\n\nFilters in the request are valid, but not supported by the connector. Remove the unsupported filter(s) to get a successful response.\n\n#### UnsupportedSortFieldError\n\nSort field (`sort[by]`) in the request is valid, but not supported by the connector. Replace or remove the sort field to get a successful response.\n\n#### InvalidCursorError\n\nPagination cursor in the request is not valid for the current connector. Make sure to use a cursor returned from the API, for the same connector.\n\n#### ConnectorExecutionError\n\nA Unified API request made via one of our downstream connectors returned an unexpected error. The `status_code` returned is proxied through to error response along with their original response via the error detail.\n\n#### UnauthorizedError\n\nWe were unable to authorize the request as made. This can happen for a number of reasons, from missing header params to passing an incorrect authorization token. Verify your Api Key is being set correctly in the authorization header. ie: `Authorization: 'Bearer <API KEY>'`\n\n#### ConnectorCredentialsError\n\nA request using a given connector has not been authorized. Ensure the connector you are trying to use has been configured correctly and been authorized for use.\n\n#### ConnectorDisabledError\n\nA request has been made to a connector that has since been disabled. This may be temporary - You can contact our team to resolve the issue.\n\n#### ConnectorRateLimitError\n\nYou sent too many request to a connector. These rate limits vary from connector to connector. You will need to try again later.\n\n#### RequestLimitError\n\nYou have reached the number of requests included in your Free Tier Subscription. You will not be able to make further requests until you upgrade your subscription. Please reach out to sales@apideck.com to continue making requests.\n\n#### EntityNotFoundError\n\nYou've made a request for a resource or route that does not exist. Verify your path parameters or any identifiers used to fetch this resource.\n\n#### OAuthCredentialsNotFoundError\n\nWhen adding a connector integration that implements OAuth, both a `client_id` and `client_secret` must be provided before any authorizations can be performed. Verify the integration has been configured properly before continuing.\n\n#### IntegrationNotFoundError\n\nThe requested connector integration could not be found associated to your `application_id`. Verify your `application_id` is correct, and that this connector has been added and configured for your application.\n\n#### ConnectionNotFoundError\n\nA valid connection could not be found associated to your `application_id`. Something _may_ have interrupted the authorization flow. You may need to start the connector authorization process again.\n\n#### ConnectionSettingsError\n\nThe connector has required settings that were not supplied. Verify `connection.settings` contains all required settings for the connector to be callable.\n\n#### ConnectorNotFoundError\n\nA request was made for an unknown connector. Verify your `service_id` is spelled correctly, and that this connector is enabled for your provided `unified_api`.\n\n#### OAuthRedirectUriError\n\nA request was made either in a connector authorization flow, or attempting to revoke connector access without a valid `redirect_uri`. This is the url the user should be returned to on completion of process.\n\n#### OAuthInvalidStateError\n\nThe state param is required and is used to ensure the outgoing authorization state has not been altered before the user is redirected back. It also contains required params needed to identify the connector being used. If this has been altered, the authorization will not succeed.\n\n#### OAuthCodeExchangeError\n\nWhen attempting to exchange the authorization code for an `access_token` during an OAuth flow, an error occurred. This may be temporary. You can reattempt authorization or contact our team to resolve the issue.\n\n#### OAuthConnectorError\n\nIt seems something went wrong on the connector side. It's possible this connector is in `beta` or still under development. We've been notified and are working to fix this issue.\n\n#### MappingError\n\nThere was an error attempting to retrieve the mapping for a given attribute. We've been notified and are working to fix this issue.\n\n#### ConnectorMappingNotFoundError\n\nIt seems the implementation for this connector is incomplete. It's possible this connector is in `beta` or still under development. We've been notified and are working to fix this issue.\n\n#### ConnectorResponseMappingNotFoundError\n\nWe were unable to retrieve the response mapping for this connector. It's possible this connector is in `beta` or still under development. We've been notified and are working to fix this issue.\n\n#### ConnectorOperationMappingNotFoundError\n\nConnector mapping has not been implemented for the requested operation. It's possible this connector is in `beta` or still under development. We've been notified and are working to fix this issue.\n\n#### ConnectorWorkflowMappingError\n\nThe composite api calls required for this operation have not been mapped entirely. It's possible this connector is in `beta` or still under development. We've been notified and are working to fix this issue.\n\n#### ConnectorOperationUnsupportedError\n\nYou're attempting a call that is not supported by the connector. It's likely this operation is supported by another connector, but we're unable to implement for this one.\n\n#### PaginationNotSupportedError\n\nPagination is not yet supported for this connector, try removing limit and/or cursor from the query. It's possible this connector is in `beta` or still under development. We've been notified and are working to fix this issue.\n\n## API Design\n\n### API Styles and data formats\n\n#### REST API\n\nThe API is organized around [REST](https://restfulapi.net/), providing simple and predictable URIs to access and modify objects. Requests support standard HTTP methods like GET, PUT, POST, and DELETE and standard status codes. JSON is returned by all API responses, including errors. In all API requests, you must set the content-type HTTP header to application/json. All API requests must be made over HTTPS. Calls made over HTTP will fail.\n\n##### Available HTTP methods\n\nThe Apideck API uses HTTP verbs to understand if you want to read (GET), delete (DELETE) or create (POST) an object. When your web application cannot do a POST or DELETE, we provide the ability to set the method through the query parameter \\_method.\n\n```\nPOST /messages\nGET /messages\nGET /messages/{messageId}\nPATCH /messages/{messageId}\nDELETE /messages/{messageId}\n```\n\nResponse bodies are always UTF-8 encoded JSON objects, unless explicitly documented otherwise. For some endpoints and use cases we divert from REST to provide a better developer experience.\n\n### Schema\n\nAll API requests and response bodies adhere to a common JSON format representing individual items, collections of items, links to related items and additional meta data.\n\n### Meta\n\nMeta data can be represented as a top level member named “meta”. Any information may be provided in the meta data. It’s most common use is to return the total number of records when requesting a collection of resources.\n\n### Request IDs\n\nEach API request has an associated request identifier. You can find this value in the response headers, under Request-Id. You can also find request identifiers in the URLs of individual request logs in your Dashboard. If you need to contact us about a specific request, providing the request identifier will ensure the fastest possible resolution.\n\n### Fixed field types\n\n#### Dates\n\nThe dates returned by the API are all represented in UTC (ISO8601 format).\n\nThis example\_`2019-11-14T00:55:31.820Z`\_is defined by the\_ISO 8601\_standard. The\_T\_in the middle separates the year-month-day portion from the hour-minute-second portion. The\_Z\_on the end means UTC, that is, an offset-from-UTC of zero hours-minutes-seconds. The\_Z\_is pronounced \"Zulu\" per military/aviation tradition.\n\nThe ISO 8601 standard is more modern. The formats are wisely designed to be easy to parse by machine as well as easy to read by humans across cultures.\n\n#### Currencies\n\nAll currency codes conform to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).\n\n## Support\n\nIf you have problems or need help with your case, you can always reach out to our Support.\n\n## Static IP\n\nSome of the APIs you want to use can require a static IP. Apideck's static IP feature allows you to use Apideck with a fixed IP avoiding the need for you to set up your own infrastructure. This feature is currently available to all Apideck customers.\nTo use this feature, the API Vendor will need to whitelist the associated static IP addresses.\nThe provided static IP addresses are fixed to their specified region and shared by all customers who use this feature.\n\n- EU Central 1: **18.197.244.247**, **18.156.9.3**, **3.65.139.215**\n- Other: upcoming\n\n  More info about our data security can be found at [https://compliance.apideck.com/](https://compliance.apideck.com/)\n\n"
  contact:
    email: hello@apideck.com
    url: https://developers.apideck.com
  x-logo:
    url: https://developers.apideck.com/icon.png
  x-apideck-api: accounting
  x-apideck-sdk-support: true
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
externalDocs:
  description: Apideck Developer Docs
  url: https://developers.apideck.com
servers:
  - url: https://unify.apideck.com
components:
  parameters:
    applicationId:
      name: x-apideck-app-id
      in: header
      required: true
      description: The ID of your Unify application
      schema:
        type: string
        minLength: 1
      example: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
      x-speakeasy-name-override: appId
    balanceSheetFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/BalanceSheetFilter'
    bankAccountsFilter:
      name: filter
      in: query
      description: Apply filters
      required: false
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/BankAccountsFilter'
    bankAccountFilter:
      name: filter
      in: query
      description: Apply filters
      required: false
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/BankAccountFilter'
    bankAccountsSort:
      name: sort
      in: query
      description: Apply sorting
      required: false
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/BankAccountsSort'
    billsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/BillsFilter'
    billsSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/BillsSort'
    companyId:
      name: x-apideck-company-id
      in: header
      description: The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.
      schema:
        type: string
      example: '12345'
      x-speakeasy-name-override: companyId
    consumerId:
      name: x-apideck-consumer-id
      in: header
      required: true
      description: ID of the consumer which you want to get or push data from
      schema:
        type: string
      example: test-consumer
      x-speakeasy-name-override: consumerId
    cursor:
      name: cursor
      in: query
      description: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
      schema:
        type: string
        nullable: true
    creditNotesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/CreditNotesFilter'
    creditNotesSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/CreditNotesSort'
    customersFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/CustomersFilter'
    customersSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/CustomersSort'
    fields:
      name: fields
      in: query
      description: 'The ''fields'' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.'
      example: id,updated_at
      schema:
        type: string
        nullable: true
    id:
      in: path
      name: id
      schema:
        type: string
      required: true
      description: ID of the record you are acting upon.
    invoiceItemsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/InvoiceItemsFilter'
    invoiceItemFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/InvoiceItemFilter'
    invoiceItemsSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/InvoiceItemsSort'
    invoicesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/InvoicesFilter'
    invoicesSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/InvoicesSort'
    journalEntriesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/JournalEntriesFilter'
    journalEntriesSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/JournalEntriesSort'
    ledgerAccountsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/LedgerAccountsFilter'
    ledgerAccountsSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/LedgerAccountsSort'
    limit:
      name: limit
      in: query
      description: Number of results to return. Minimum 1, Maximum 200, Default 20
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 20
    passThrough:
      name: pass_through
      in: query
      description: 'Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads'
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/PassThroughQuery'
    paymentsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/PaymentsFilter'
    paymentsSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/PaymentsSort'
    profitAndLossFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/ProfitAndLossFilter'
    purchaseOrdersFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/PurchaseOrdersFilter'
    projectsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/ProjectsFilter'
    projectsSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/ProjectsSort'
    purchaseOrdersSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/PurchaseOrdersSort'
    refundsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/RefundsFilter'
    refundsSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/RefundsSort'
    raw:
      name: raw
      in: query
      description: Include raw response. Mostly used for debugging purposes
      schema:
        type: boolean
        default: false
    serviceId:
      name: x-apideck-service-id
      in: header
      description: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
      schema:
        type: string
      example: salesforce
      x-speakeasy-name-override: serviceId
    suppliersFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/SuppliersFilter'
    suppliersSort:
      name: sort
      in: query
      description: Apply sorting
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/SuppliersSort'
    taxRatesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/TaxRatesFilter'
    accountingDepartmentsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/AccountingDepartmentsFilter'
    accountingLocationsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/AccountingLocationsFilter'
    referenceType:
      in: path
      name: reference_type
      schema:
        $ref: '#/components/schemas/AttachmentReferenceType'
      required: true
      description: The reference type of the document.
      example: invoice
    referenceId:
      in: path
      name: reference_id
      schema:
        $ref: '#/components/schemas/Id'
      required: true
      description: The reference id of the object to retrieve.
      example: '123456'
    attachmentMetadata:
      name: x-apideck-metadata
      in: header
      description: Metadata to attach to the attachment file (JSON string)
      required: true
      schema:
        type: string
        format: json
      examples:
        basic:
          value: '{"name":"document.pdf","description":"Invoice attachment"}'
    contentType:
      name: content-type
      in: header
      description: The content-type of the file being uploaded
      required: true
      schema:
        type: string
    agedReportFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/AgedReportFilter'
    categoriesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/CategoriesFilter'
    expensesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/ExpensesFilter'
    accountingEmployeesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/AccountingEmployeesFilter'
    expenseCategoriesFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/ExpenseCategoriesFilter'
    expenseReportsFilter:
      name: filter
      in: query
      description: Apply filters
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/ExpenseReportsFilter'
  responses:
    BadRequestResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestResponse'
      description: Bad Request
    CompanyInfo:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CompanyInfo'
      description: Company Info
    CreateBillResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateBillResponse'
      description: Bill created
    CreateBankAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateBankAccountResponse'
      description: Bank Account created
    CreateCreditNoteResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateCreditNoteResponse'
      description: Credit Note created
    CreateCustomerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateCustomerResponse'
      description: Customers
    CreateInvoiceItemResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateInvoiceItemResponse'
      description: InvoiceItems
    CreateInvoiceResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateInvoiceResponse'
      description: Invoice created
    CreateLedgerAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateLedgerAccountResponse'
      description: LedgerAccount created
    CreatePaymentResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreatePaymentResponse'
      description: Payment created
    CreateSupplierResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSupplierResponse'
      description: Supplier created
    CreateTaxRateResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateTaxRateResponse'
      description: TaxRate created
    DeleteBillResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteBillResponse'
      description: Bill deleted
    DeleteBankAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteBankAccountResponse'
      description: Bank Account deleted
    DeleteCreditNoteResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteCreditNoteResponse'
      description: Credit Note deleted
    DeleteCustomerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteCustomerResponse'
      description: Customers
    DeleteInvoiceItemResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteTaxRateResponse'
      description: InvoiceItems
    DeleteInvoiceResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteInvoiceResponse'
      description: Invoice deleted
    DeleteLedgerAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteLedgerAccountResponse'
      description: LedgerAccount deleted
    DeletePaymentResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeletePaymentResponse'
      description: Payment deleted
    DeleteSupplierResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteSupplierResponse'
      description: Supplier deleted
    DeleteTaxRateResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteTaxRateResponse'
      description: TaxRates deleted
    GetBalanceSheetResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBalanceSheetResponse'
      description: BalanceSheet
    GetBankAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBankAccountResponse'
      description: Bank Account
    GetBankAccountsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBankAccountsResponse'
      description: Bank Accounts
    GetBillResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBillResponse'
      description: Bill
    GetBillsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBillsResponse'
      description: Bills
    GetCompanyInfoResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCompanyInfoResponse'
      description: CompanyInfo
    GetCompaniesResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCompaniesResponse'
      description: Companies
    GetCreditNoteResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCreditNoteResponse'
      description: Credit Note
    GetCreditNotesResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCreditNotesResponse'
      description: Credit Notes
    GetCustomerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCustomerResponse'
      description: Customer
    GetCustomersResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCustomersResponse'
      description: Customers
    GetInvoiceItemResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetInvoiceItemResponse'
      description: InvoiceItems
    GetInvoiceItemsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetInvoiceItemsResponse'
      description: InvoiceItems
    GetInvoiceResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetInvoiceResponse'
      description: Invoice
    GetInvoicesResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetInvoicesResponse'
      description: Invoices
    GetLedgerAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetLedgerAccountResponse'
      description: LedgerAccount
    GetLedgerAccountsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetLedgerAccountsResponse'
      description: LedgerAccounts
    GetPaymentResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetPaymentResponse'
      description: Payment
    GetPaymentsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetPaymentsResponse'
      description: Payments
    CreateSubsidiaryResponse:
      description: Subsidiaries
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSubsidiaryResponse'
    DeleteSubsidiaryResponse:
      description: Subsidiarys
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteSubsidiaryResponse'
    GetSubsidiariesResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetSubsidiariesResponse'
      description: Subsidiaries
    GetSubsidiaryResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetSubsidiaryResponse'
      description: Subsidiary
    GetAccountingLocationsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccountingLocationsResponse'
      description: Locations
    GetAccountingLocationResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccountingLocationResponse'
      description: Location
    CreateAccountingLocationResponse:
      description: Location
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateAccountingLocationResponse'
    UpdateAccountingLocationResponse:
      description: Location
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateAccountingLocationResponse'
    DeleteAccountingLocationResponse:
      description: Location deleted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteAccountingLocationResponse'
    GetAccountingDepartmentsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccountingDepartmentsResponse'
      description: Departments
    GetAccountingDepartmentResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccountingDepartmentResponse'
      description: Location
    CreateAccountingDepartmentResponse:
      description: Department
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateAccountingDepartmentResponse'
    UpdateAccountingDepartmentResponse:
      description: Department
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateAccountingDepartmentResponse'
    DeleteAccountingDepartmentResponse:
      description: Department deleted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteAccountingDepartmentResponse'
    UpdateSubsidiaryResponse:
      description: Subsidiaries
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateSubsidiaryResponse'
    GetSupplierResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetSupplierResponse'
      description: Supplier
    GetSuppliersResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetSuppliersResponse'
      description: Suppliers
    GetTaxRateResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetTaxRateResponse'
      description: TaxRate
    GetTaxRatesResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetTaxRatesResponse'
      description: TaxRates
    NotFoundResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundResponse'
      description: The specified resource was not found
    NotImplementedResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotImplementedResponse'
      description: Not Implemented
    PaymentRequiredResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredResponse'
      description: Payment Required
    TooManyRequestsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TooManyRequestsResponse'
      description: Too Many Requests
    UnauthorizedResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedResponse'
      description: Unauthorized
    UnexpectedErrorResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnexpectedErrorResponse'
      description: Unexpected error
    UnprocessableResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnprocessableResponse'
      description: Unprocessable
    UpdateBankAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateBankAccountResponse'
      description: Bank Account updated
    UpdateBillResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateBillResponse'
      description: Bill Updated
    UpdateCreditNoteResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateCreditNoteResponse'
      description: Credit Note updated
    UpdateCustomerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateCustomerResponse'
      description: Customers
    UpdateInvoiceItemResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateInvoiceItemsResponse'
      description: InvoiceItems
    UpdateInvoiceResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateInvoiceResponse'
      description: Invoice updated
    UpdateLedgerAccountResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateLedgerAccountResponse'
      description: LedgerAccount updated
    UpdatePaymentResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdatePaymentResponse'
      description: Payment Updated
    UpdateSupplierResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateSupplierResponse'
      description: Supplier updated
    UpdateTaxRateResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateTaxRateResponse'
      description: TaxRate updated
    GetProfitAndLossResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetProfitAndLossResponse'
      description: Profit & Loss Report
    CreateJournalEntryResponse:
      description: JournalEntries
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateJournalEntryResponse'
    DeleteJournalEntryResponse:
      description: JournalEntries
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteJournalEntryResponse'
    GetJournalEntryResponse:
      description: JournalEntries
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetJournalEntryResponse'
    GetJournalEntriesResponse:
      description: JournalEntry
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetJournalEntriesResponse'
    JournalEntry:
      description: JournalEntries
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JournalEntry'
    UpdateJournalEntryResponse:
      description: JournalEntries
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateJournalEntryResponse'
    CreatePurchaseOrderResponse:
      description: PurchaseOrders
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreatePurchaseOrderResponse'
    DeletePurchaseOrderResponse:
      description: PurchaseOrders
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeletePurchaseOrderResponse'
    GetPurchaseOrderResponse:
      description: PurchaseOrders
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetPurchaseOrderResponse'
    GetPurchaseOrdersResponse:
      description: PurchaseOrders
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetPurchaseOrdersResponse'
    PurchaseOrder:
      description: PurchaseOrders
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PurchaseOrder'
    UpdatePurchaseOrderResponse:
      description: PurchaseOrders
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdatePurchaseOrderResponse'
    GetRefundResponse:
      description: Refund
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetRefundResponse'
    GetRefundsResponse:
      description: Refunds
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetRefundsResponse'
    CreateRefundResponse:
      description: Refund created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateRefundResponse'
    UpdateRefundResponse:
      description: Refund updated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateRefundResponse'
    DeleteRefundResponse:
      description: Refund deleted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteRefundResponse'
    GetAttachmentsResponse:
      description: Attachments
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAttachmentsResponse'
    CreateAttachmentResponse:
      description: Attachments
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateAttachmentResponse'
    DeleteAttachmentResponse:
      description: Attachments
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteAttachmentResponse'
    GetAttachmentResponse:
      description: Attachments
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAttachmentResponse'
    GetAttachmentDownloadResponse:
      description: Attachment Download
      content:
        '*/*':
          schema:
            type: string
            format: binary
    GetTrackingCategoriesResponse:
      description: Tracking categories
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetTrackingCategoriesResponse'
    GetTrackingCategoryResponse:
      description: Tracking category
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetTrackingCategoryResponse'
    CreateTrackingCategoryResponse:
      description: Tracking category created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateTrackingCategoryResponse'
    UpdateTrackingCategoryResponse:
      description: Tracking category updated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateTrackingCategoryResponse'
    DeleteTrackingCategoryResponse:
      description: Tracking category deleted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteTrackingCategoryResponse'
    GetBillPaymentsResponse:
      description: Bill Payments
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBillPaymentsResponse'
    GetBillPaymentResponse:
      description: Bill Payment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBillPaymentResponse'
    CreateBillPaymentResponse:
      description: Bill Payment created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateBillPaymentResponse'
    UpdateBillPaymentResponse:
      description: Bill Payment updated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateBillPaymentResponse'
    DeleteBillPaymentResponse:
      description: Bill Payment deleted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteBillPaymentResponse'
    CreateExpenseResponse:
      description: Expenses
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateExpenseResponse'
    DeleteExpenseResponse:
      description: Expenses
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteExpenseResponse'
    GetExpenseResponse:
      description: Expenses
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetExpenseResponse'
    GetExpensesResponse:
      description: Expenses
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetExpensesResponse'
    UpdateExpenseResponse:
      description: Expenses
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateExpenseResponse'
    GetAgedCreditorsResponse:
      description: Aged Creditors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAgedCreditorsResponse'
    GetAgedDebtorsResponse:
      description: Aged Debtors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAgedDebtorsResponse'
    CreateBankFeedAccountResponse:
      description: Bank Feed Accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateBankFeedAccountResponse'
    DeleteBankFeedAccountResponse:
      description: Bank Feed Accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteBankFeedAccountResponse'
    GetBankFeedAccountResponse:
      description: Bank Feed Accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBankFeedAccountResponse'
    GetBankFeedAccountsResponse:
      description: Bank Feed Accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBankFeedAccountsResponse'
    UpdateBankFeedAccountResponse:
      description: Bank Feed Accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateBankFeedAccountResponse'
    CreateBankFeedStatementResponse:
      description: Bank Feed Statements
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateBankFeedStatementResponse'
    DeleteBankFeedStatementResponse:
      description: Bank Feed Statements
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteBankFeedStatementResponse'
    GetBankFeedStatementResponse:
      description: Bank Feed Statements
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBankFeedStatementResponse'
    GetBankFeedStatementsResponse:
      description: Bank Feed Statements
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetBankFeedStatementsResponse'
    UpdateBankFeedStatementResponse:
      description: Bank Feed Statements
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateBankFeedStatementResponse'
    GetCategoryResponse:
      description: Category
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCategoryResponse'
    GetCategoriesResponse:
      description: Categories
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCategoriesResponse'
    CreateQuoteResponse:
      description: Quotes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateQuoteResponse'
    DeleteQuoteResponse:
      description: Quotes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteQuoteResponse'
    GetQuoteResponse:
      description: Quotes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetQuoteResponse'
    GetQuotesResponse:
      description: Quotes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetQuotesResponse'
    UpdateQuoteResponse:
      description: Quotes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateQuoteResponse'
    CreateProjectResponse:
      description: Projects
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateProjectResponse'
    DeleteProjectResponse:
      description: Projects
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteProjectResponse'
    GetProjectResponse:
      description: Projects
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetProjectResponse'
    GetProjectsResponse:
      description: Projects
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetProjectsResponse'
    UpdateProjectResponse:
      description: Projects
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateProjectResponse'
    CreateAccountingEmployeeResponse:
      description: Employees
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateAccountingEmployeeResponse'
    DeleteAccountingEmployeeResponse:
      description: Employees
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteAccountingEmployeeResponse'
    GetAccountingEmployeeResponse:
      description: Employees
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccountingEmployeeResponse'
    GetAccountingEmployeesResponse:
      description: Employees
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccountingEmployeesResponse'
    UpdateAccountingEmployeeResponse:
      description: Employees
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateAccountingEmployeeResponse'
    CreateExpenseCategoryResponse:
      description: Expense Categories
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateExpenseCategoryResponse'
    DeleteExpenseCategoryResponse:
      description: Expense Categories
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteExpenseCategoryResponse'
    GetExpenseCategoryResponse:
      description: Expense Categories
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetExpenseCategoryResponse'
    GetExpenseCategoriesResponse:
      description: Expense Categories
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetExpenseCategoriesResponse'
    UpdateExpenseCategoryResponse:
      description: Expense Categories
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateExpenseCategoryResponse'
    CreateExpenseReportResponse:
      description: Expense Reports
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateExpenseReportResponse'
    DeleteExpenseReportResponse:
      description: Expense Reports
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteExpenseReportResponse'
    GetExpenseReportResponse:
      description: Expense Reports
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetExpenseReportResponse'
    GetExpenseReportsResponse:
      description: Expense Reports
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetExpenseReportsResponse'
    UpdateExpenseReportResponse:
      description: Expense Reports
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateExpenseReportResponse'
  schemas:
    AccountCode:
      title: Account Code
      description: The account code of the account
      type: string
      example: '1100'
    AccountId:
      title: Account Id
      description: The unique identifier for the account.
      type: string
      example: '123456'
      readOnly: true
    AccountName:
      title: Account Name
      description: The name of the account.
      type: string
      example: Current assets
      readOnly: true
    Amount:
      title: Amount
      description: The amount or value of the item
      type: number
      example: 1000
      readOnly: true
    AccountingByRow:
      type: boolean
      title: Accounting by Row
      description: Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row.
      nullable: true
      example: false
    AccountingBankAccount:
      type: object
      x-apideck-schema-id: AccountingBankAccount
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: edge-case
        display_id: edge-case
        name: high
        account_number: critical
        account_type: high
        ledger_account: low
        bank_name: medium
        currency: high
        balance: high
        available_balance: medium
        overdraft_limit: medium
        routing_number: medium
        iban: high
        bic: medium
        bsb_number: edge-case
        branch_identifier: low
        bank_code: low
        country: medium
        status: high
        description: low
        created_at: low
        updated_at: low
        created_by: low
        updated_by: low
      required:
        - id
      x-apideck-strict-required:
        - name
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          type: string
          title: Display ID
          description: Display ID for the bank account
          example: BA-001
          nullable: true
        name:
          $ref: '#/components/schemas/BankAccountName'
        account_number:
          $ref: '#/components/schemas/BankAccountNumber'
        account_type:
          type: string
          title: Account Type
          description: The type of bank account
          x-apideck-enum-id: bank_accounts.account_type
          enum:
            - checking
            - savings
            - credit_card
            - money_market
            - line_of_credit
            - other
            - cash
          example: checking
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        bank_name:
          $ref: '#/components/schemas/BankName'
        currency:
          $ref: '#/components/schemas/Currency'
        balance:
          type: number
          title: Current Balance
          description: The current balance of the bank account
          example: 25000
          nullable: true
        available_balance:
          type: number
          title: Available Balance
          description: The available balance (considering pending transactions and overdraft)
          example: 24500
          nullable: true
        overdraft_limit:
          type: number
          title: Overdraft Limit
          description: The overdraft limit for the account
          example: 5000
          nullable: true
        routing_number:
          $ref: '#/components/schemas/RoutingNumber'
        iban:
          $ref: '#/components/schemas/IBAN'
        bic:
          $ref: '#/components/schemas/BIC'
        bsb_number:
          $ref: '#/components/schemas/BSBNumber'
        branch_identifier:
          $ref: '#/components/schemas/BranchIdentifier'
        bank_code:
          $ref: '#/components/schemas/BankCode'
        country:
          $ref: '#/components/schemas/Country'
        status:
          type: string
          title: Status
          description: The status of the bank account
          x-apideck-enum-id: bank_accounts.status
          enum:
            - active
            - inactive
            - closed
          example: active
          nullable: true
        description:
          type: string
          title: Description
          description: Description or notes about the bank account
          example: Primary operating account for daily transactions
          nullable: true
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
    AccountingCustomer:
      $ref: '#/components/schemas/Customer'
    AccountingEmployee:
      type: object
      x-apideck-schema-id: AccountingEmployee
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: low
        display_id: high
        first_name: critical
        last_name: critical
        display_name: critical
        emails: high
        employee_number: high
        job_title: medium
        status: critical
        is_contractor: medium
        department: medium
        location: medium
        manager: medium
        hire_date: medium
        termination_date: medium
        gender: low
        birth_date: low
        subsidiary: medium
        tracking_categories: low
        currency: edge-case
        notes: low
        addresses: low
        phone_numbers: low
        bank_account: medium
        custom_fields: medium
        custom_mappings: low
        row_version: low
        updated_at: medium
        created_at: medium
        pass_through: low
      x-apideck-strict-required:
        - id
        - first_name
        - last_name
        - status
      x-apideck-strict-any-of:
        - required:
            - first_name
        - required:
            - last_name
        - required:
            - display_name
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        first_name:
          type: string
          title: First Name
          description: The first name of the employee.
          example: John
          nullable: true
        last_name:
          type: string
          title: Last Name
          description: The last name of the employee.
          example: Doe
          nullable: true
        display_name:
          type: string
          title: Display Name
          description: The display name of the employee.
          example: John Doe
          nullable: true
        emails:
          type: array
          title: Email Addresses
          description: Email addresses of the employee.
          items:
            $ref: '#/components/schemas/Email'
        employee_number:
          type: string
          title: Employee Number
          description: The employee number or identifier.
          example: EMP-001
          nullable: true
        job_title:
          type: string
          title: Job Title
          description: The job title of the employee.
          example: Senior Accountant
          nullable: true
        status:
          type: string
          title: Employee Status
          description: The status of the employee.
          x-apideck-enum-id: accounting_employees.status
          enum:
            - active
            - inactive
            - terminated
          example: active
          nullable: true
        is_contractor:
          type: boolean
          title: Is Contractor
          description: Whether the employee is a contractor.
          example: false
          nullable: true
        department:
          $ref: '#/components/schemas/LinkedDepartment'
        location:
          $ref: '#/components/schemas/LinkedLocation'
        manager:
          type: object
          title: Manager
          description: The manager of the employee.
          properties:
            id:
              type: string
              title: Manager ID
              description: A unique identifier for the manager.
              example: '12345'
            name:
              type: string
              title: Manager Name
              description: The name of the manager.
              example: Jane Smith
              nullable: true
        hire_date:
          type: string
          title: Hire Date
          description: The date the employee was hired.
          format: date
          example: '2020-01-15'
          nullable: true
        termination_date:
          type: string
          title: Termination Date
          description: The date the employee was terminated.
          format: date
          example: '2025-12-31'
          nullable: true
        gender:
          $ref: '#/components/schemas/Gender'
        birth_date:
          type: string
          title: Birth Date
          description: The date of birth of the employee.
          format: date
          example: '1990-05-20'
          nullable: true
        subsidiary:
          $ref: '#/components/schemas/LinkedSubsidiary'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        currency:
          $ref: '#/components/schemas/Currency'
        notes:
          type: string
          title: Notes
          description: Notes about the employee.
          example: Some notes about this employee
          nullable: true
        addresses:
          type: array
          title: Addresses
          description: Addresses of the employee.
          items:
            $ref: '#/components/schemas/Address'
        phone_numbers:
          type: array
          title: Phone Numbers
          description: Phone numbers of the employee.
          items:
            $ref: '#/components/schemas/PhoneNumber'
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    AccountingEmployeesFilter:
      type: object
      x-apideck-schema-id: AccountingEmployeesFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        status: active
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        status:
          type: string
          enum:
            - active
            - inactive
            - terminated
          x-apideck-enum-id: accounting_employees.status
      additionalProperties: false
    GetAccountingEmployeeResponse:
      type: object
      x-apideck-schema-id: GetAccountingEmployeeResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Employees
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/AccountingEmployee'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetAccountingEmployeesResponse:
      type: object
      x-apideck-schema-id: GetAccountingEmployeesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Employees
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountingEmployee'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateAccountingEmployeeResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Employees
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateAccountingEmployeeResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Employees
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteAccountingEmployeeResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Employees
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    AccountingInvoiceId:
      title: Invoice Id
      description: The unique identifier for the invoice.
      type: string
      example: '123456'
      readOnly: true
    AccountingSalesOrderId:
      type: string
      title: Sales Order ID
      description: The unique identifier for the sales order.
      example: '123456'
      nullable: true
    AccountingProjectId:
      type: string
      title: Project ID
      description: The unique identifier for the linked project.
      example: '12345'
    AccountingEventType:
      type: string
      x-apideck-enum-id: accounting.events
      enum:
        - '*'
        - accounting.customer.created
        - accounting.customer.updated
        - accounting.customer.deleted
        - accounting.invoice.created
        - accounting.invoice.updated
        - accounting.invoice.deleted
        - accounting.invoice_item.created
        - accounting.invoice_item.updated
        - accounting.invoice_item.deleted
        - accounting.ledger_account.created
        - accounting.ledger_account.updated
        - accounting.ledger_account.deleted
        - accounting.tax_rate.created
        - accounting.tax_rate.updated
        - accounting.tax_rate.deleted
        - accounting.bill.created
        - accounting.bill.updated
        - accounting.bill.deleted
        - accounting.bill_payment.created
        - accounting.bill_payment.updated
        - accounting.bill_payment.deleted
        - accounting.payment.created
        - accounting.payment.updated
        - accounting.payment.deleted
        - accounting.supplier.created
        - accounting.supplier.updated
        - accounting.supplier.deleted
        - accounting.purchase_order.created
        - accounting.purchase_order.updated
        - accounting.purchase_order.deleted
        - accounting.expense.created
        - accounting.expense.updated
        - accounting.expense.deleted
        - accounting.credit_note.created
        - accounting.credit_note.updated
        - accounting.credit_note.deleted
        - accounting.quote.created
        - accounting.quote.updated
        - accounting.quote.deleted
        - accounting.project.created
        - accounting.project.updated
        - accounting.project.deleted
    AccountingWebhookEvent:
      x-sdk-exclude: true
      allOf:
        - $ref: '#/components/schemas/WebhookEvent/allOf/0'
        - type: object
          properties:
            event_type:
              $ref: '#/components/schemas/AccountingEventType'
    AccountingConnectionCompany:
      type: object
      x-apideck-schema-id: AccountingConnectionCompany
      additionalProperties: false
      description: Represents a company/tenant/organization accessible through the current connection. Used for multi-company connectors where a single OAuth connection provides access to multiple companies.
      x-apideck-weights:
        id: critical
        name: critical
      required:
        - id
        - name
      properties:
        id:
          type: string
          title: Company ID
          description: Unique identifier for the company in the downstream system. Use this value in the x-apideck-company-id header to scope requests to this company.
          example: '12345'
        name:
          type: string
          title: Company Name
          description: Display name of the company
          example: Acme Corporation
    Active:
      type: boolean
      title: Is active
      example: true
      nullable: true
    Address:
      type: object
      x-apideck-schema-id: Address
      additionalProperties: false
      x-apideck-weights:
        id: edge-case
        name: edge-case
        type: critical
        line1: high
        line2: low
        line3: edge-case
        line4: edge-case
        line5: edge-case
        street_number: low
        city: high
        string: low
        state: high
        postal_code: high
        country: high
        latitude: low
        longitude: low
        county: edge-case
        contact_name: edge-case
        salutation: edge-case
        phone_number: edge-case
        fax: edge-case
        email: edge-case
        website: edge-case
        row_version: edge-case
      properties:
        id:
          description: Unique identifier for the address.
          type: string
          example: '123'
          nullable: true
        type:
          type: string
          description: The type of address.
          x-apideck-enum-id: addresses.type
          enum:
            - primary
            - secondary
            - home
            - office
            - shipping
            - billing
            - work
            - other
          example: primary
          nullable: true
        string:
          type: string
          description: The address string. Some APIs don't provide structured address data.
          example: 25 Spring Street, Blackburn, VIC 3130
          nullable: true
        name:
          description: The name of the address.
          type: string
          example: HQ US
          nullable: true
        line1:
          type: string
          example: Main street
          description: 'Line 1 of the address e.g. number, street, suite, apt #, etc.'
          nullable: true
        line2:
          type: string
          example: 'apt #'
          description: Line 2 of the address
          nullable: true
        line3:
          type: string
          example: 'Suite #'
          description: Line 3 of the address
          nullable: true
        line4:
          type: string
          example: delivery instructions
          description: Line 4 of the address
          nullable: true
        line5:
          type: string
          example: 'Attention: Finance Dept'
          description: Line 5 of the address
          nullable: true
        street_number:
          type: string
          example: '25'
          description: Street number
          nullable: true
        city:
          type: string
          example: San Francisco
          description: Name of city.
          nullable: true
        state:
          type: string
          example: CA
          description: Name of state
          nullable: true
        postal_code:
          type: string
          example: '94104'
          description: Zip code or equivalent.
          nullable: true
        country:
          type: string
          example: US
          description: country code according to ISO 3166-1 alpha-2.
          nullable: true
        latitude:
          description: Latitude of the address
          type: string
          example: '40.759211'
          nullable: true
        longitude:
          description: Longitude of the address
          type: string
          example: '-73.984638'
          nullable: true
        county:
          type: string
          example: Santa Clara
          description: Address field that holds a sublocality, such as a county
          nullable: true
        contact_name:
          description: Name of the contact person at the address
          type: string
          example: Elon Musk
          nullable: true
        salutation:
          description: Salutation of the contact person at the address
          type: string
          example: Mr
          nullable: true
        phone_number:
          description: Phone number of the address
          type: string
          example: 111-111-1111
          nullable: true
        fax:
          description: Fax number of the address
          type: string
          example: 122-111-1111
          nullable: true
        email:
          description: Email address of the address
          type: string
          example: elon@musk.com
          nullable: true
        website:
          description: Website of the address
          type: string
          example: https://elonmusk.com
          nullable: true
        notes:
          description: Additional notes
          type: string
          title: Notes
          example: Address notes or delivery instructions.
          nullable: true
        row_version:
          $ref: '#/components/schemas/RowVersion'
    BadRequestResponse:
      type: object
      x-apideck-schema-id: BadRequest
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 400
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Bad Request
        type_name:
          type: string
          description: The type of error returned
          example: RequestValidationError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Invalid Params
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Missing property foobar
            - type: object
              x-speakeasy-detail: true
              example:
                missing:
                  - foobar: required
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#requestvalidationerror
        downstream_errors:
          type: array
          description: Contains downstream errors returned from the connector. Only present when type_name is ConnectorExecutionError.
          items:
            type: object
            properties:
              message:
                type: string
                description: Error message from the downstream provider
              detail:
                type: string
                description: Additional error details
              code:
                type: string
                description: Error code from the downstream provider
          example:
            - message: Account code '100' has been archived or deleted
              detail: Each line item must reference a valid account
              code: VALIDATION_ERROR
    BalanceSheet:
      type: object
      x-apideck-schema-id: BalanceSheet
      x-apideck-circular-ref: true
      x-apideck-weights:
        reports: critical
      additionalProperties: false
      required:
        - reports
      properties:
        reports:
          type: array
          x-apideck-schema-id: BalanceSheetReports
          items:
            type: object
            x-apideck-schema-id: BalanceSheetReport
            x-apideck-weights:
              id: medium
              report_name: medium
              start_date: medium
              end_date: critical
              currency: medium
              assets: critical
              liabilities: critical
              equity: critical
              net_assets: high
              custom_mappings: edge-case
              updated_by: edge-case
              created_by: edge-case
              updated_at: low
              created_at: edge-case
              uncategorized_items: edge-case
            additionalProperties: false
            required:
              - end_date
              - assets
              - liabilities
              - equity
            properties:
              id:
                $ref: '#/components/schemas/Id'
              report_name:
                type: string
                description: The name of the report
                title: Report Name
                example: BalanceSheet
              start_date:
                type: string
                description: The start date of the report
                title: Start Date
                pattern: ^\d{4}-\d{2}-\d{2}$
                example: '2017-01-01'
              end_date:
                type: string
                description: The start date of the report
                title: Start Date
                pattern: ^\d{4}-\d{2}-\d{2}$
                example: '2017-01-31'
              currency:
                $ref: '#/components/schemas/Currency'
              assets:
                type: object
                x-apideck-schema-id: BalanceSheetAssetsAccount
                x-apideck-weights:
                  account_id: high
                  name: high
                  value: critical
                  items: medium
                title: Balance Sheet Assets Account
                description: A balance sheet assets account represents the financial position of a company at a specific point in time.
                additionalProperties: false
                properties:
                  account_id:
                    $ref: '#/components/schemas/AccountId'
                  code:
                    $ref: '#/components/schemas/AccountCode'
                  name:
                    $ref: '#/components/schemas/AccountName'
                  value:
                    $ref: '#/components/schemas/Amount'
                  items:
                    $ref: '#/components/schemas/BalanceSheetAccounts'
                example:
                  account_id: '1'
                  code: '1000'
                  name: Assets
                  value: 50000
                  items:
                    - account_id: '101'
                      code: '1100'
                      name: Current Assets
                      value: 20000
                      items:
                        - account_id: '1011'
                          code: '1101'
                          name: Cash and Cash Equivalents
                          value: 10000
                        - account_id: '1012'
                          code: '1102'
                          name: Accounts Receivable
                          value: 5000
                        - account_id: '1013'
                          code: '1103'
                          name: Inventory
                          value: 3000
                        - account_id: '1014'
                          code: '1104'
                          name: Prepaid Expenses
                          value: 2000
                    - account_id: '102'
                      code: '1200'
                      name: Non-Current Assets
                      value: 30000
                      items:
                        - account_id: '1021'
                          code: '1201'
                          name: Property, Plant, and Equipment (PPE)
                          value: 25000
                        - account_id: '1022'
                          code: '1202'
                          name: Intangible Assets
                          value: 5000
                          items:
                            - account_id: '10221'
                              code: '1203'
                              name: Goodwill
                              value: 3000
                            - account_id: '10222'
                              code: '1204'
                              name: Patents
                              value: 2000
              liabilities:
                type: object
                x-apideck-schema-id: BalanceSheetLiabilitiesAccount
                x-apideck-weights:
                  account_id: high
                  name: high
                  value: critical
                  items: medium
                title: Balance Sheet Liabilities Account
                description: A balance sheet liabilities account represents the financial position of a company at a specific point in time.
                additionalProperties: false
                properties:
                  account_id:
                    $ref: '#/components/schemas/AccountId'
                  code:
                    $ref: '#/components/schemas/AccountCode'
                  name:
                    $ref: '#/components/schemas/AccountName'
                  value:
                    $ref: '#/components/schemas/Amount'
                  items:
                    $ref: '#/components/schemas/BalanceSheetAccounts'
                example:
                  account_id: '2'
                  code: '2000'
                  name: Liabilities
                  value: 30000
                  items:
                    - account_id: '201'
                      code: '2100'
                      name: Current Liabilities
                      value: 10000
                      items:
                        - account_id: '2011'
                          code: '2101'
                          name: Accounts Payable
                          value: 4000
                        - account_id: '2012'
                          code: '2102'
                          name: Short-Term Debt
                          value: 2000
                        - account_id: '2013'
                          code: '2103'
                          name: Accrued Expenses
                          value: 1000
                        - account_id: '2014'
                          code: '2104'
                          name: Current Portion of Long-Term Debt
                          value: 3000
                    - account_id: '202'
                      code: '2200'
                      name: Non-Current Liabilities
                      value: 20000
                      items:
                        - account_id: '2021'
                          code: '2201'
                          name: Long-Term Debt
                          value: 15000
                        - account_id: '2022'
                          code: '2202'
                          name: Deferred Tax Liabilities
                          value: 3000
                        - account_id: '2023'
                          code: '2203'
                          name: Pension Liabilities
                          value: 2000
              equity:
                type: object
                x-apideck-schema-id: BalanceSheetEquityAccount
                x-apideck-weights:
                  account_id: high
                  name: high
                  value: critical
                  items: medium
                title: Balance Sheet Equity Account
                description: A balance sheet equity account represents the financial position of a company at a specific point in time.
                additionalProperties: false
                properties:
                  account_id:
                    $ref: '#/components/schemas/AccountId'
                  code:
                    $ref: '#/components/schemas/AccountCode'
                  name:
                    $ref: '#/components/schemas/AccountName'
                  value:
                    $ref: '#/components/schemas/Amount'
                  items:
                    $ref: '#/components/schemas/BalanceSheetAccounts'
                example:
                  account_id: '3'
                  code: '3000'
                  name: Equity
                  value: 20000
                  items:
                    - account_id: '301'
                      code: '3100'
                      name: Common Stock
                      value: 5000
                    - account_id: '302'
                      code: '3200'
                      name: Retained Earnings
                      value: 10000
                    - account_id: '303'
                      code: '3300'
                      name: Additional Paid-In Capital
                      value: 3000
                    - account_id: '304'
                      code: '3400'
                      name: Treasury Stock
                      value: -1000
                    - account_id: '305'
                      code: '3500'
                      name: Other Comprehensive Income
                      value: 3000
              net_assets:
                type: number
                description: The net assets of the balance sheet
                title: Net Assets
                example: 1000
              custom_mappings:
                $ref: '#/components/schemas/CustomMappings'
              updated_by:
                $ref: '#/components/schemas/UpdatedBy'
              created_by:
                $ref: '#/components/schemas/CreatedBy'
              updated_at:
                $ref: '#/components/schemas/UpdatedAt'
              created_at:
                $ref: '#/components/schemas/CreatedAt'
              uncategorized_items:
                type: object
                x-apideck-schema-id: BalanceSheetUncategorizedItemsAccount
                x-apideck-weights:
                  account_id: high
                  name: high
                  value: critical
                  items: medium
                title: Balance Sheet Uncategorized Items Account
                description: A balance sheet uncategorized items account represents the financial position of a company at a specific point in time.
                additionalProperties: false
                properties:
                  account_id:
                    $ref: '#/components/schemas/AccountId'
                  code:
                    $ref: '#/components/schemas/AccountCode'
                  name:
                    $ref: '#/components/schemas/AccountName'
                  value:
                    $ref: '#/components/schemas/Amount'
                  items:
                    $ref: '#/components/schemas/BalanceSheetAccounts'
                example:
                  account_id: '3'
                  code: '3000'
                  name: Uncategorized Items
                  value: 1000
                  items:
                    - account_id: '301'
                      code: '3100'
                      name: not linked account
                      value: 1000
    BalanceSheetAccount:
      type: object
      x-apideck-schema-id: BalanceSheetAccount
      x-apideck-weights:
        account_id: critical
        name: high
        value: critical
        items: medium
      title: Balance Sheet Account
      description: A balance sheet account represents the financial position of a company at a specific point in time.
      additionalProperties: false
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        code:
          $ref: '#/components/schemas/AccountCode'
        name:
          $ref: '#/components/schemas/AccountName'
        value:
          $ref: '#/components/schemas/Amount'
        items:
          $ref: '#/components/schemas/BalanceSheetAccounts'
    BalanceSheetAccounts:
      type: array
      x-apideck-schema-id: BalanceSheetAccounts
      x-speakeasy-type-override: any
      title: Balance Sheet Accounts
      description: A list of balance sheet accounts
      nullable: true
      items:
        anyOf:
          - $ref: '#/components/schemas/BalanceSheetAccount'
          - $ref: '#/components/schemas/BalanceSheetAccountRecord'
    BalanceSheetAccountRecord:
      type: object
      x-apideck-schema-id: BalanceSheetAccountRecord
      x-apideck-weights:
        account_id: critical
        name: high
        value: critical
        items: medium
      title: Balance Sheet Account Record
      description: A record of a balance sheet account.
      additionalProperties: false
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        code:
          $ref: '#/components/schemas/AccountCode'
        name:
          $ref: '#/components/schemas/AccountName'
        value:
          $ref: '#/components/schemas/Amount'
    BalanceSheetFilter:
      type: object
      x-apideck-schema-id: BalanceSheetFilter
      example:
        start_date: '2021-01-01'
        end_date: '2021-12-31'
        period_count: 3
        period_type: month
        location_id: '123'
        accounting_method: accrual
      properties:
        start_date:
          type: string
          title: Start date
          description: The start date of the period to include in the resource.
          example: '2021-01-01'
          deprecated: true
        end_date:
          type: string
          title: End date
          description: The end date of the period to include in the resource.
          example: '2021-12-31'
        period_count:
          type: integer
          title: Period count
          description: The number of periods to include in the resource.
          example: 3
        period_type:
          x-apideck-enum-id: balance-sheet.period-type
          type: string
          title: Period type
          description: 'The type of period to include in the resource: month, quarter, year.'
          example: month
          enum:
            - month
            - quarter
            - year
        location_id:
          type: string
          title: Location ID
          description: The ID of the location to include in the resource.
          example: '123'
        accounting_method:
          x-apideck-enum-id: balance-sheet.accounting-method
          type: string
          title: Accounting Method
          description: 'The accounting method used for the report: cash or accrual.'
          example: accrual
          enum:
            - cash
            - accrual
      additionalProperties: false
    BankAccount:
      type: object
      x-apideck-schema-id: BankAccount
      additionalProperties: false
      x-apideck-weights:
        account_number: critical
        account_name: medium
        account_type: medium
        iban: high
        bic: medium
        bsb_number: edge-case
        branch_identifier: low
        bank_code: low
        bank_name: medium
        currency: medium
        country: low
      properties:
        bank_name:
          $ref: '#/components/schemas/BankName'
        account_number:
          $ref: '#/components/schemas/BankAccountNumber'
        account_name:
          $ref: '#/components/schemas/BankAccountName'
        account_type:
          type: string
          title: Account Type
          x-apideck-enum-id: bank-accounts.account_type
          enum:
            - bank_account
            - credit_card
            - other
          description: The type of bank account.
          example: credit_card
          nullable: true
        iban:
          $ref: '#/components/schemas/IBAN'
        bic:
          $ref: '#/components/schemas/BIC'
        routing_number:
          $ref: '#/components/schemas/RoutingNumber'
        bsb_number:
          $ref: '#/components/schemas/BSBNumber'
        branch_identifier:
          $ref: '#/components/schemas/BranchIdentifier'
        bank_code:
          $ref: '#/components/schemas/BankCode'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
    BankAccountName:
      type: string
      title: Account Name
      description: The name of the bank account
      example: Main Operating Account
      nullable: true
    BankAccountNumber:
      type: string
      title: Account Number
      description: The bank account number
      example: '123465'
      nullable: true
    BankName:
      type: string
      title: Bank Name
      description: The name of the bank or financial institution
      example: Chase Bank
      nullable: true
    BIC:
      type: string
      title: BIC/SWIFT Code
      description: Bank Identifier Code / SWIFT Code
      example: CHASUS33
      nullable: true
    IBAN:
      type: string
      title: IBAN
      description: International Bank Account Number
      example: GB33BUKB20201555555555
      nullable: true
    RoutingNumber:
      type: string
      title: Routing Number
      description: Bank routing number (US)
      example: '021000021'
      nullable: true
    BSBNumber:
      type: string
      title: BSB Number
      description: Bank State Branch number (Australia/New Zealand)
      example: 062-001
      nullable: true
    BranchIdentifier:
      type: string
      title: Branch Identifier
      description: Bank branch identifier
      example: '001'
      nullable: true
    BankCode:
      type: string
      title: Bank Code
      description: Bank code assigned by central bank
      example: BNH
      nullable: true
    BankAccountFilter:
      type: object
      x-apideck-schema-id: BankAccountFilter
      additionalProperties: false
      properties:
        account_type:
          type: string
          title: Account Type
          description: Filter by account type
          x-apideck-enum-id: bank_accounts.account_type
          enum:
            - checking
            - savings
            - credit_card
            - money_market
            - line_of_credit
            - other
            - cash
          example: checking
    BankAccountsFilter:
      type: object
      x-apideck-schema-id: BankAccountsFilter
      additionalProperties: false
      properties:
        name:
          type: string
          title: Name
          description: Filter by bank account name
          example: Main Operating
        account_type:
          type: string
          title: Account Type
          description: Filter by account type
          x-apideck-enum-id: bank_accounts.account_type
          enum:
            - checking
            - savings
            - credit_card
            - money_market
            - line_of_credit
            - other
            - cash
          example: checking
        status:
          type: string
          title: Status
          description: Filter by account status
          x-apideck-enum-id: bank_accounts.status
          enum:
            - active
            - inactive
            - closed
          example: active
    BankAccountsSort:
      type: object
      x-apideck-schema-id: BankAccountsSort
      additionalProperties: false
      properties:
        by:
          type: string
          title: Sort By
          description: The field to sort by
          x-apideck-enum-id: bank_accounts.sort_by
          enum:
            - created_at
            - updated_at
          example: updated_at
          default: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
    Bill:
      type: object
      x-apideck-schema-id: Bill
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: low
        display_id: low
        bill_number: high
        supplier: high
        company_id: middle
        location_id: low
        department_id: low
        currency: medium
        currency_rate: low
        tax_inclusive: low
        bill_date: critical
        due_date: critical
        paid_date: high
        po_number: low
        reference: low
        line_items: critical
        terms: low
        terms_id: edge-case
        balance: high
        deposit: low
        sub_total: high
        total_tax: high
        total: critical
        tax_code: medium
        notes: low
        status: critical
        approved_by: low
        amortization_type: edge-case
        tax_method: edge-case
        template_id: edge-case
        ledger_account: low
        payment_method: low
        channel: low
        language: low
        accounting_by_row: edge-case
        bank_account: low
        discount_percentage: medium
        tracking_categories: low
        updated_by: low
        created_by: low
        created_at: edge-case
        updated_at: high
        row_version: edge-case
        accounting_period: low
        custom_fields: medium
        document_received: low
        attachments: edge-case
        source_document_url: low
        payment_allocations: high
      x-apideck-strict-required:
        - id
        - bill_date
        - due_date
        - line_items
        - total
        - status
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        bill_number:
          type: string
          title: Bill number
          example: '10001'
          description: Reference to supplier bill number
          nullable: true
        supplier:
          $ref: '#/components/schemas/LinkedSupplier'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        location_id:
          $ref: '#/components/schemas/LocationId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        bill_date:
          type: string
          title: Bill date
          description: Date bill was issued - YYYY-MM-DD.
          format: date
          example: '2020-09-30'
          nullable: true
        due_date:
          $ref: '#/components/schemas/DueDate'
        paid_date:
          type: string
          title: Paid date
          description: The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD.
          format: date
          example: '2020-10-30'
          nullable: true
        po_number:
          type: string
          title: Purchase Order number
          description: A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order.
          example: '90000117'
          nullable: true
        reference:
          $ref: '#/components/schemas/Reference'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/BillLineItem'
        terms:
          type: string
          title: Terms
          description: Terms of payment.
          example: Net 30 days
          nullable: true
        terms_id:
          $ref: '#/components/schemas/TermsId'
        balance:
          type: number
          title: Balance
          description: Balance of bill due.
          example: 27500
          nullable: true
        deposit:
          type: number
          title: Deposit
          description: Amount of deposit made to this bill.
          example: 0
          nullable: true
        sub_total:
          $ref: '#/components/schemas/SubTotal'
        total_tax:
          $ref: '#/components/schemas/TotalTax'
        total:
          type: number
          title: Total amount
          description: Total amount of bill, including tax.
          example: 27500
          nullable: true
        tax_code:
          $ref: '#/components/schemas/TaxCode'
        notes:
          type: string
          title: Notes
          example: Some notes about this bill.
          nullable: true
        status:
          type: string
          title: Status
          description: Invoice status
          example: draft
          x-apideck-enum-id: invoices.status
          enum:
            - draft
            - submitted
            - authorised
            - partially_paid
            - paid
            - void
            - credit
            - deleted
            - posted
          nullable: true
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        channel:
          $ref: '#/components/schemas/Channel'
        language:
          $ref: '#/components/schemas/Language'
        accounting_by_row:
          $ref: '#/components/schemas/AccountingByRow'
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        discount_percentage:
          $ref: '#/components/schemas/DiscountPercentage'
        template_id:
          type: string
          title: Template
          description: Optional bill template
          example: '123456'
          nullable: true
        approved_by:
          type: string
          title: Approved by
          description: The user who approved the bill
          example: John Doe
          nullable: true
        amortization_type:
          type: string
          title: Amortization Type
          description: Type of amortization
          x-apideck-enum-id: bills.amortization-type
          enum:
            - manual
            - receipt
            - schedule
            - other
          nullable: true
        tax_method:
          type: string
          title: Tax method
          description: Method of tax calculation
          example: Due to supplier
          nullable: true
        document_received:
          type: boolean
          title: Document received
          description: Whether the document has been received
          example: true
          nullable: true
        source_document_url:
          type: string
          title: Source document URL
          description: URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
          example: https://www.invoicesolution.com/bill/123456
          nullable: true
        payment_allocations:
          $ref: '#/components/schemas/LinkedPaymentAllocations'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
        accounting_period:
          $ref: '#/components/schemas/AccountingPeriod'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/LinkedAttachment'
    BillLineItem:
      type: object
      title: Bill Line Item
      x-apideck-schema-id: BillLineItem
      additionalProperties: false
      x-apideck-weights:
        id: high
        row_id: edge-case
        code: medium
        line_number: medium
        description: high
        type: medium
        tax_amount: high
        total_amount: high
        retention_amount: edge-case
        payment_amount: low
        quantity: high
        unit_price: high
        unit_of_measure: edge-case
        discount_percentage: low
        discount_amount: low
        location_id: low
        department_id: low
        subsidiary_id: low
        category_id: edge-case
        shipping_id: edge-case
        memo: low
        prepaid: edge-case
        tax_applicable_on: edge-case
        tax_recoverability: edge-case
        tax_method: edge-case
        item: high
        tax_rate: medium
        ledger_account: low
        purchase_order: low
        tracking_categories: low
        customer: low
        rebilling: medium
        row_version: edge-case
        created_at: edge-case
        updated_at: high
        updated_by: edge-case
        created_by: edge-case
        worktags: edge-case
      properties:
        id:
          $ref: '#/components/schemas/Id'
        row_id:
          type: string
          title: Row ID
          description: Row ID
          example: '12345'
        code:
          type: string
          title: Item code
          description: User defined item code
          example: 120-C
          nullable: true
        line_number:
          $ref: '#/components/schemas/LineNumber'
        description:
          type: string
          title: Description
          description: User defined description
          example: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
          nullable: true
        type:
          $ref: '#/components/schemas/LineItemType'
        tax_amount:
          $ref: '#/components/schemas/TaxAmount'
        total_amount:
          type: number
          title: Total amount
          description: Total amount of the line item
          example: 27500
          nullable: true
        quantity:
          $ref: '#/components/schemas/Quantity'
        unit_price:
          $ref: '#/components/schemas/UnitPrice'
        unit_of_measure:
          $ref: '#/components/schemas/UnitOfMeasure'
        discount_percentage:
          type: number
          title: Discount Percentage
          description: Discount percentage applied to the line item when supported downstream.
          example: 0.01
          nullable: true
        discount_amount:
          type: number
          title: Discount Amount
          description: Discount amount applied to the line item when supported downstream.
          example: 19.99
          nullable: true
        location_id:
          $ref: '#/components/schemas/LocationId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        subsidiary_id:
          $ref: '#/components/schemas/SubsidiaryId'
        category_id:
          type: string
          title: Category ID
          description: ID of the category of the line item
          example: '12345'
          nullable: true
        shipping_id:
          type: string
          title: Shipping ID
          description: ID of the shipping of the line item
          example: '12345'
          nullable: true
        memo:
          type: string
          title: Memo
          description: Memo
          example: Some memo
          nullable: true
        prepaid:
          type: boolean
          title: Prepaid
          description: Whether the line item is prepaid
          example: true
          nullable: true
        tax_applicable_on:
          type: string
          title: Tax Applicable On
          description: Tax applicable on
          example: Domestic_Purchase_of_Goods_and_Services
          nullable: true
        tax_recoverability:
          type: string
          title: Tax Recoverability
          description: Tax recoverability
          example: Fully_Recoverable
          nullable: true
        tax_method:
          type: string
          title: Tax method
          description: Method of tax calculation
          example: Due_to_Supplier
          nullable: true
        retention_amount:
          type: number
          title: Retention amount
          description: Retention amount
          example: 1000
          nullable: true
        payment_amount:
          type: number
          title: Payment amount
          description: Payment amount
          example: 1000
          nullable: true
        item:
          $ref: '#/components/schemas/LinkedInvoiceItem'
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        purchase_order:
          $ref: '#/components/schemas/LinkedPurchaseOrder'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        rebilling:
          $ref: '#/components/schemas/Rebilling'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        worktags:
          type: array
          description: A list of linked worktags. This is only supported for Workday.
          items:
            $ref: '#/components/schemas/LinkedWorktag'
    BillsFilter:
      type: object
      x-apideck-schema-id: BillsFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        status: paid
        id_since: '1'
      properties:
        id_since:
          type: string
          title: Since ID
          description: Return records with a row ID greater than or equal to the given value
          example: '1'
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        status:
          type: string
          title: Status
          description: Filter by bill status
          x-apideck-enum-id: bills.status
          enum:
            - paid
            - unpaid
            - partially_paid
          example: paid
      additionalProperties: false
    BillsSort:
      type: object
      x-apideck-schema-id: BillsSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: bills.sort_by
          description: The field on which to sort the Bills
          enum:
            - updated_at
            - created_at
            - id
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    Channel:
      type: string
      title: Channel
      description: The channel through which the transaction is processed.
      nullable: true
      example: email
    Company:
      type: object
      x-apideck-schema-id: Company
      x-apideck-weights:
        id: critical
        name: critical
        interaction_count: edge-case
        owner_id: high
        image: low
        description: medium
        vat_number: high
        currency: medium
        status: high
        fax: low
        annual_revenue: low
        number_of_employees: low
        industry: medium
        ownership: low
        sales_tax_number: medium
        payee_number: edge-case
        abn_or_tfn: edge-case
        abn_branch: edge-case
        acn: edge-case
        first_name: edge-case
        last_name: edge-case
        parent_id: edge-case
        bank_accounts: medium
        websites: medium
        addresses: high
        social_links: low
        phone_numbers: high
        emails: high
        row_type: edge-case
        custom_fields: medium
        tags: low
        read_only: low
        last_activity_at: low
        deleted: medium
        salutation: edge-case
        birthday: edge-case
        updated_by: edge-case
        created_by: edge-case
        updated_at: high
        created_at: medium
      required:
        - name
      additionalProperties: false
      properties:
        id:
          description: Unique identifier for the company
          type: string
          readOnly: true
          example: '12345'
        name:
          title: Name
          description: Name of the company
          type: string
          example: SpaceX
          nullable: true
        interaction_count:
          description: Number of interactions
          type: integer
          example: 1
          readOnly: true
          nullable: true
        owner_id:
          description: Owner ID
          type: string
          example: '12345'
          nullable: true
        image:
          description: The Image URL of the company
          type: string
          example: https://www.spacex.com/static/images/share.jpg
          nullable: true
        description:
          description: A description of the company
          type: string
          example: Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.
          nullable: true
        vat_number:
          description: The VAT number of the company
          type: string
          example: BE0689615164
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        status:
          description: The status of the company
          type: string
          example: Open
          nullable: true
        fax:
          description: The fax number of the company
          type: string
          example: '+12129876543'
          nullable: true
        annual_revenue:
          description: The annual revenue of the company
          type: string
          example: +$35m
          nullable: true
        number_of_employees:
          description: Number of employees
          type: string
          example: 500-1000
          nullable: true
        industry:
          description: The industry represents the type of business the company is in.
          type: string
          example: Apparel
          nullable: true
        ownership:
          description: The ownership indicates the type of ownership of the company.
          type: string
          example: Public
          nullable: true
        sales_tax_number:
          title: Sales tax number
          description: A sales tax number is a unique number that identifies a company for tax purposes.
          type: string
          example: 12456EN
          nullable: true
        payee_number:
          title: Payee number
          description: A payee number is a unique number that identifies a payee for tax purposes.
          type: string
          example: 78932EN
          nullable: true
        abn_or_tfn:
          title: ABN or TFN
          description: An ABN is necessary for operating a business, while a TFN (Tax File Number) is required for any person working in Australia.
          type: string
          example: 46 115 614 695
          nullable: true
        abn_branch:
          title: ABN Branch
          description: An ABN Branch (also known as a GST Branch) is used if part of your business needs to account for GST separately from its parent entity.
          type: string
          example: '123'
          nullable: true
        acn:
          title: ACN
          description: The Australian Company Number (ACN) is a nine digit number with the last digit being a check digit calculated using a modified modulus 10 calculation. ASIC has adopted a convention of always printing and displaying the ACN in the format XXX XXX XXX; three blocks of three characters, each block separated by a blank.
          type: string
          example: XXX XXX XXX
          nullable: true
        first_name:
          $ref: '#/components/schemas/FirstName'
        last_name:
          $ref: '#/components/schemas/LastName'
        parent_id:
          description: Parent ID
          type: string
          readOnly: true
          nullable: true
          example: '22345'
        bank_accounts:
          type: array
          items:
            $ref: '#/components/schemas/BankAccount'
        websites:
          type: array
          items:
            $ref: '#/components/schemas/Website'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        social_links:
          type: array
          items:
            $ref: '#/components/schemas/SocialLink'
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/Email'
        row_type:
          x-apideck-weights:
            id: critical
            name: medium
          type: object
          title: Company Row Type
          properties:
            id:
              type: string
              example: '12345'
              nullable: true
            name:
              type: string
              example: Customer Account
              nullable: true
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        tags:
          $ref: '#/components/schemas/Tags'
        read_only:
          description: Whether the company is read-only or not
          type: boolean
          title: Read-only
          example: false
          nullable: true
        last_activity_at:
          description: Last activity date
          type: string
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
        deleted:
          description: Whether the company is deleted or not
          type: boolean
          example: false
          readOnly: true
        salutation:
          type: string
          description: A formal salutation for the person. For example, 'Mr', 'Mrs'
          example: Mr
          nullable: true
        birthday:
          type: string
          title: Birth Date
          description: The date of birth of the person.
          example: '2000-08-12'
          format: date
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        updated_by:
          description: Updated by user ID
          type: string
          example: '12345'
          readOnly: true
          nullable: true
        created_by:
          description: Created by user ID
          type: string
          example: '12345'
          readOnly: true
          nullable: true
        updated_at:
          description: Last updated date
          type: string
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
        created_at:
          description: Creation date
          type: string
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    AccountingCompanyId:
      type: string
      title: CompanyId
      description: The company ID the transaction belongs to
      example: '12345'
      nullable: true
    CompanyInfo:
      type: object
      x-apideck-schema-id: CompanyInfo
      x-apideck-weights:
        id: medium
        company_name: critical
        status: critical
        legal_name: medium
        sales_tax_number: medium
        currency: medium
        language: low
        fiscal_year_start_month: medium
        company_start_date: medium
        addresses: medium
        phone_numbers: medium
        emails: medium
        default_sales_tax: edge-case
        sales_tax_enabled: edge-case
        automated_sales_tax: edge-case
        tracking_categories_enabled: edge-case
        tracking_categories_mode: edge-case
        accounting_method: edge-case
        row_version: edge-case
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: low
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        company_name:
          $ref: '#/components/schemas/CompanyName'
        status:
          type: string
          title: Company status
          description: Based on the status some functionality is enabled or disabled.
          x-apideck-enum-id: company-info.status
          enum:
            - active
            - inactive
          example: active
        legal_name:
          type: string
          title: Legal name
          description: The legal name of the company
          example: SpaceX Inc.
        country:
          type: string
          example: US
          description: country code according to ISO 3166-1 alpha-2.
          nullable: true
        sales_tax_number:
          $ref: '#/components/schemas/SalesTaxNumber'
        automated_sales_tax:
          type: boolean
          title: Automated sales tax
          description: Whether sales tax is calculated automatically for the company
        sales_tax_enabled:
          type: boolean
          title: Sales tax enabled
          description: Whether sales tax is enabled for the company
        default_sales_tax:
          $ref: '#/components/schemas/TaxRate'
        currency:
          $ref: '#/components/schemas/Currency'
        language:
          $ref: '#/components/schemas/Language'
        fiscal_year_start_month:
          type: string
          title: The start month of fiscal year.
          description: The start month of fiscal year.
          x-apideck-enum-id: company-info.fiscal_year_start_month
          enum:
            - January
            - February
            - March
            - April
            - May
            - June
            - July
            - August
            - September
            - October
            - November
            - December
          example: January
        company_start_date:
          type: string
          title: Date when company file was created
          description: Date when company file was created
          format: date
          example: '2015-06-05'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/Email'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        tracking_categories_enabled:
          type: boolean
          title: Tracking categories enabled
          description: Whether tracking categories are enabled for the company on transactions
        tracking_categories_mode:
          type: string
          title: Tracking categories mode
          description: The mode of tracking categories for the company on transactions
          x-apideck-enum-id: company-info.tracking_categories_mode
          enum:
            - transaction
            - line
            - both
            - disabled
          example: disabled
        accounting_method:
          type: string
          title: Accounting method
          description: The accounting basis used by the company for financial reports.
          x-apideck-enum-id: company-info.accounting-method
          enum:
            - cash
            - accrual
          example: accrual
          nullable: true
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
    CompanyName:
      type: string
      title: Company name
      description: The name of the company.
      example: SpaceX
      nullable: true
    Contact:
      type: object
      x-apideck-schema-id: Contact
      x-apideck-weights:
        id: critical
        name: critical
        owner_id: medium
        type: medium
        company_id: high
        company_name: medium
        lead_id: medium
        first_name: high
        middle_name: low
        last_name: high
        prefix: low
        suffix: low
        title: medium
        department: medium
        language: medium
        gender: medium
        birthday: medium
        image: medium
        photo_url: medium
        lead_source: low
        fax: low
        description: low
        current_balance: edge-case
        status: edge-case
        active: edge-case
        websites: medium
        addresses: high
        social_links: low
        phone_numbers: high
        emails: high
        email_domain: edge-case
        custom_fields: medium
        tags: low
        first_call_at: edge-case
        first_email_at: edge-case
        last_activity_at: medium
        updated_at: high
        created_at: medium
        opportunity_ids: low
      x-pii:
        - name
        - first_name
        - middle_name
        - last_name
        - email
      properties:
        id:
          description: Unique identifier for the contact.
          type: string
          example: '12345'
          readOnly: true
        name:
          description: Full name of the contact.
          type: string
          example: Elon Musk
          nullable: true
        owner_id:
          description: The owner of the contact.
          type: string
          example: '54321'
          nullable: true
        type:
          description: The type of the contact.
          type: string
          example: personal
          x-apideck-enum-id: contacts.type
          enum:
            - customer
            - supplier
            - employee
            - personal
          nullable: true
        company_id:
          description: The company the contact is associated with.
          type: string
          example: '23456'
          nullable: true
        company_name:
          description: The name of the company the contact is associated with.
          type: string
          example: '23456'
          nullable: true
        lead_id:
          description: The lead the contact is associated with.
          type: string
          example: '34567'
          nullable: true
        first_name:
          description: The first name of the contact.
          type: string
          example: Elon
          nullable: true
        middle_name:
          description: The middle name of the contact.
          type: string
          example: D.
          nullable: true
        last_name:
          description: The last name of the contact.
          type: string
          example: Musk
          nullable: true
        prefix:
          description: The prefix of the contact.
          type: string
          example: Mr.
          nullable: true
        suffix:
          description: The suffix of the contact.
          type: string
          example: PhD
          nullable: true
        title:
          description: The job title of the contact.
          type: string
          example: CEO
          nullable: true
        department:
          description: The department of the contact.
          type: string
          example: Engineering
          nullable: true
        language:
          type: string
          example: EN
          description: language code according to ISO 639-1. For the United States - EN
          nullable: true
        gender:
          type: string
          x-apideck-enum-id: contacts.gender
          enum:
            - male
            - female
            - unisex
          description: The gender of the contact.
          example: female
          nullable: true
        birthday:
          description: The birthday of the contact.
          type: string
          example: '2000-08-12'
          nullable: true
        image:
          type: string
          example: https://unavatar.io/elon-musk
          nullable: true
          deprecated: true
        photo_url:
          type: string
          title: Photo URL
          description: The URL of the photo of a person.
          example: https://unavatar.io/elon-musk
          nullable: true
        lead_source:
          description: The lead source of the contact.
          type: string
          example: Cold Call
          nullable: true
        fax:
          description: The fax number of the contact.
          type: string
          example: '+12129876543'
          nullable: true
        description:
          description: The description of the contact.
          type: string
          title: Description
          example: Internal champion
          nullable: true
        current_balance:
          description: The current balance of the contact.
          type: number
          title: Current Balance
          example: 10.5
          nullable: true
        status:
          description: The status of the contact.
          type: string
          example: open
          nullable: true
        active:
          description: The active status of the contact.
          type: boolean
          example: true
          nullable: true
        websites:
          type: array
          items:
            $ref: '#/components/schemas/Website'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        social_links:
          type: array
          items:
            $ref: '#/components/schemas/SocialLink'
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/Email'
        email_domain:
          type: string
          example: gmail.com
          nullable: true
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
          nullable: true
        tags:
          $ref: '#/components/schemas/Tags'
        first_call_at:
          description: The first call date of the contact.
          type: string
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
        first_email_at:
          description: The first email date of the contact.
          type: string
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
        last_activity_at:
          description: The last activity date of the contact.
          type: string
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        updated_at:
          description: The last update date of the contact.
          type: string
          format: date-time
          example: '2017-08-12T20:43:21.291Z'
          readOnly: true
          nullable: true
        created_at:
          description: The creation date of the contact.
          type: string
          format: date-time
          example: '2017-08-12T20:43:21.291Z'
          readOnly: true
          nullable: true
        opportunity_ids:
          description: The opportunity ids of the contact.
          type: array
          items:
            type: string
            example: '12345'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
      additionalProperties: false
    CreateBankAccountResponse:
      type: object
      x-apideck-schema-id: CreateBankAccountResponse
      additionalProperties: false
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 201
        status:
          type: string
          description: HTTP Response Status
          example: Created
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-accounts
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
    CreateBillResponse:
      type: object
      x-apideck-schema-id: CreateBillResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: bills
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateCreditNoteResponse:
      type: object
      x-apideck-schema-id: CreateCreditNoteResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: credit-notes
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateCustomerResponse:
      type: object
      x-apideck-schema-id: CreateCustomerResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: customers
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateInvoiceItemResponse:
      type: object
      x-apideck-schema-id: CreateInvoiceItemResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoice-items
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateInvoiceResponse:
      type: object
      x-apideck-schema-id: CreateInvoiceResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoices
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/InvoiceResponse'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateJournalEntryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: journal-entries
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateLedgerAccountResponse:
      type: object
      x-apideck-schema-id: CreateLedgerAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: ledger-accounts
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreatePaymentResponse:
      type: object
      x-apideck-schema-id: CreatePaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreatePurchaseOrderResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: PurchaseOrders
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateSupplierResponse:
      type: object
      x-apideck-schema-id: CreateSupplierResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateTaxRateResponse:
      type: object
      x-apideck-schema-id: CreateTaxRateResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: tax-rates
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreatedAt:
      type: string
      title: Created at (timestamp)
      description: The date and time when the object was created.
      format: date-time
      example: '2020-09-30T07:43:32.000Z'
      readOnly: true
      nullable: true
    CreatedBy:
      type: string
      title: Created by
      description: The user who created the object.
      example: '12345'
      readOnly: true
      nullable: true
    CreditNote:
      type: object
      x-apideck-schema-id: CreditNote
      x-apideck-weights:
        id: critical
        number: low
        customer: high
        company_id: middle
        location_id: low
        department_id: low
        currency: critical
        currency_rate: medium
        tax_inclusive: low
        sub_total: critical
        total_amount: critical
        total_tax: edge-case
        tax_code: edge-case
        balance: critical
        remaining_credit: edge-case
        status: high
        reference: low
        date_issued: edge-case
        date_paid: critical
        type: edge-case
        account: critical
        line_items: medium
        allocations: medium
        note: low
        terms: low
        terms_id: edge-case
        billing_address: low
        shipping_address: low
        tracking_categories: low
        custom_fields: medium
        row_version: edge-case
        updated_by: low
        created_by: low
        created_at: medium
        updated_at: medium
      required:
        - id
        - total_amount
      x-apideck-strict-required:
        - total_amount
        - currency
        - customer
      additionalProperties: false
      properties:
        id:
          type: string
          title: Credit Note identifier
          description: Unique identifier representing the entity
          example: '123456'
          readOnly: true
        number:
          type: string
          title: Credit note number
          description: Credit note number.
          example: OIT00546
          nullable: true
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        location_id:
          $ref: '#/components/schemas/LocationId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        sub_total:
          title: Sub-total amount
          description: Sub-total amount, normally before tax.
          type: number
          example: 27500
          nullable: true
        total_amount:
          type: number
          title: Total amount
          description: Amount of transaction
          example: 49.99
        total_tax:
          type: number
          title: Total tax amount
          description: Total tax amount applied to this invoice.
          example: 2500
          nullable: true
        tax_code:
          type: string
          title: Tax Code
          description: Applicable tax id/code override if tax is not supplied on a line item basis.
          example: '1234'
          nullable: true
        balance:
          type: number
          title: Balance
          description: The balance reflecting any payments made against the transaction.
          example: 27500
          nullable: true
        remaining_credit:
          type: number
          title: Remaining Credit
          description: Indicates the total credit amount still available to apply towards the payment.
          example: 27500
          nullable: true
        status:
          type: string
          title: Credit Note status
          description: Status of credit notes
          x-apideck-enum-id: credit-notes.status
          enum:
            - draft
            - authorised
            - posted
            - partially_paid
            - paid
            - voided
            - deleted
          example: authorised
        reference:
          type: string
          title: Credit Note reference
          description: 'Optional reference message ie: Debit remittance detail.'
          example: '123456'
          nullable: true
        date_issued:
          type: string
          title: Datetime
          description: Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD
          format: date-time
          example: '2021-05-01T12:00:00.000Z'
        date_paid:
          type: string
          title: Datetime
          description: Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD
          format: date-time
          example: '2021-05-01T12:00:00.000Z'
          nullable: true
        type:
          type: string
          title: Credit Note Type
          description: Type of payment
          x-apideck-enum-id: credit-notes.type
          enum:
            - accounts_receivable_credit
            - accounts_payable_credit
          example: accounts_receivable_credit
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
        allocations:
          type: array
          items:
            $ref: '#/components/schemas/Allocation'
        note:
          type: string
          title: Note
          description: Optional note to be associated with the credit note.
          example: Some notes about this credit note
          nullable: true
        terms:
          type: string
          title: Terms
          description: Optional terms to be associated with the credit note.
          example: Some terms about this credit note
          nullable: true
        terms_id:
          $ref: '#/components/schemas/TermsId'
        billing_address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    CreditNotesFilter:
      type: object
      x-apideck-schema-id: CreditNotesFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        id_since: '1'
      properties:
        id_since:
          type: string
          title: Since ID
          description: Return records with a row ID greater than or equal to the given value
          example: '1'
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
      additionalProperties: false
    CreditNotesSort:
      type: object
      x-apideck-schema-id: CreditNotesSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: customers.sort_by
          description: The field on which to sort the Customers
          enum:
            - created_at
            - updated_at
            - id
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    Currency:
      type: string
      title: Currency
      description: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
      example: USD
      x-apideck-enum-id: currencies
      x-apideck-enum-coverage-ignore: true
      enum:
        - UNKNOWN_CURRENCY
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BOV
        - BRL
        - BSD
        - BTN
        - BWP
        - BYR
        - BZD
        - CAD
        - CDF
        - CHE
        - CHF
        - CHW
        - CLF
        - CLP
        - CNY
        - COP
        - COU
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LTL
        - LVL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRO
        - MUR
        - MVR
        - MWK
        - MXN
        - MXV
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRC
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - USN
        - USS
        - UYI
        - UYU
        - UZS
        - VEF
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XBA
        - XBB
        - XBC
        - XBD
        - XCD
        - XDR
        - XOF
        - XPD
        - XPF
        - XPT
        - XTS
        - XXX
        - YER
        - ZAR
        - ZMK
        - ZMW
        - BTC
        - ETH
      x-enum-elements:
        - name: UNKNOWN_CURRENCY
          description: Unknown currency
        - name: AED
          description: United Arab Emirates dirham
        - name: AFN
          description: Afghan afghani
        - name: ALL
          description: Albanian lek
        - name: AMD
          description: Armenian dram
        - name: ANG
          description: Netherlands Antillean guilder
        - name: AOA
          description: Angolan kwanza
        - name: ARS
          description: Argentine peso
        - name: AUD
          description: Australian dollar
        - name: AWG
          description: Aruban florin
        - name: AZN
          description: Azerbaijani manat
        - name: BAM
          description: Bosnia and Herzegovina convertible mark
        - name: BBD
          description: Barbados dollar
        - name: BDT
          description: Bangladeshi taka
        - name: BGN
          description: Bulgarian lev
        - name: BHD
          description: Bahraini dinar
        - name: BIF
          description: Burundian franc
        - name: BMD
          description: Bermudian dollar
        - name: BND
          description: Brunei dollar
        - name: BOB
          description: Boliviano
        - name: BOV
          description: Bolivian Mvdol
        - name: BRL
          description: Brazilian real
        - name: BSD
          description: Bahamian dollar
        - name: BTN
          description: Bhutanese ngultrum
        - name: BWP
          description: Botswana pula
        - name: BYR
          description: Belarusian ruble
        - name: BZD
          description: Belize dollar
        - name: CAD
          description: Canadian dollar
        - name: CDF
          description: Congolese franc
        - name: CHE
          description: WIR Euro
        - name: CHF
          description: Swiss franc
        - name: CHW
          description: WIR Franc
        - name: CLF
          description: Unidad de Fomento
        - name: CLP
          description: Chilean peso
        - name: CNY
          description: Chinese yuan
        - name: COP
          description: Colombian peso
        - name: COU
          description: Unidad de Valor Real
        - name: CRC
          description: Costa Rican colon
        - name: CUC
          description: Cuban convertible peso
        - name: CUP
          description: Cuban peso
        - name: CVE
          description: Cape Verdean escudo
        - name: CZK
          description: Czech koruna
        - name: DJF
          description: Djiboutian franc
        - name: DKK
          description: Danish krone
        - name: DOP
          description: Dominican peso
        - name: DZD
          description: Algerian dinar
        - name: EGP
          description: Egyptian pound
        - name: ERN
          description: Eritrean nakfa
        - name: ETB
          description: Ethiopian birr
        - name: EUR
          description: Euro
        - name: FJD
          description: Fiji dollar
        - name: FKP
          description: Falkland Islands pound
        - name: GBP
          description: Pound sterling
        - name: GEL
          description: Georgian lari
        - name: GHS
          description: Ghanaian cedi
        - name: GIP
          description: Gibraltar pound
        - name: GMD
          description: Gambian dalasi
        - name: GNF
          description: Guinean franc
        - name: GTQ
          description: Guatemalan quetzal
        - name: GYD
          description: Guyanese dollar
        - name: HKD
          description: Hong Kong dollar
        - name: HNL
          description: Honduran lempira
        - name: HRK
          description: Croatian kuna
        - name: HTG
          description: Haitian gourde
        - name: HUF
          description: Hungarian forint
        - name: IDR
          description: Indonesian rupiah
        - name: ILS
          description: Israeli new shekel
        - name: INR
          description: Indian rupee
        - name: IQD
          description: Iraqi dinar
        - name: IRR
          description: Iranian rial
        - name: ISK
          description: Icelandic króna
        - name: JMD
          description: Jamaican dollar
        - name: JOD
          description: Jordanian dinar
        - name: JPY
          description: Japanese yen
        - name: KES
          description: Kenyan shilling
        - name: KGS
          description: Kyrgyzstani som
        - name: KHR
          description: Cambodian riel
        - name: KMF
          description: Comoro franc
        - name: KPW
          description: North Korean won
        - name: KRW
          description: South Korean won
        - name: KWD
          description: Kuwaiti dinar
        - name: KYD
          description: Cayman Islands dollar
        - name: KZT
          description: Kazakhstani tenge
        - name: LAK
          description: Lao kip
        - name: LBP
          description: Lebanese pound
        - name: LKR
          description: Sri Lankan rupee
        - name: LRD
          description: Liberian dollar
        - name: LSL
          description: Lesotho loti
        - name: LTL
          description: Lithuanian litas
        - name: LVL
          description: Latvian lats
        - name: LYD
          description: Libyan dinar
        - name: MAD
          description: Moroccan dirham
        - name: MDL
          description: Moldovan leu
        - name: MGA
          description: Malagasy ariary
        - name: MKD
          description: Macedonian denar
        - name: MMK
          description: Myanmar kyat
        - name: MNT
          description: Mongolian tögrög
        - name: MOP
          description: Macanese pataca
        - name: MRO
          description: Mauritanian ouguiya
        - name: MUR
          description: Mauritian rupee
        - name: MVR
          description: Maldivian rufiyaa
        - name: MWK
          description: Malawian kwacha
        - name: MXN
          description: Mexican peso
        - name: MXV
          description: Mexican Unidad de Inversion
        - name: MYR
          description: Malaysian ringgit
        - name: MZN
          description: Mozambican metical
        - name: NAD
          description: Namibian dollar
        - name: NGN
          description: Nigerian naira
        - name: NIO
          description: Nicaraguan córdoba
        - name: NOK
          description: Norwegian krone
        - name: NPR
          description: Nepalese rupee
        - name: NZD
          description: New Zealand dollar
        - name: OMR
          description: Omani rial
        - name: PAB
          description: Panamanian balboa
        - name: PEN
          description: Peruvian sol
        - name: PGK
          description: Papua New Guinean kina
        - name: PHP
          description: Philippine peso
        - name: PKR
          description: Pakistani rupee
        - name: PLN
          description: Polish złoty
        - name: PYG
          description: Paraguayan guaraní
        - name: QAR
          description: Qatari riyal
        - name: RON
          description: Romanian leu
        - name: RSD
          description: Serbian dinar
        - name: RUB
          description: Russian ruble
        - name: RWF
          description: Rwandan franc
        - name: SAR
          description: Saudi riyal
        - name: SBD
          description: Solomon Islands dollar
        - name: SCR
          description: Seychelles rupee
        - name: SDG
          description: Sudanese pound
        - name: SEK
          description: Swedish krona
        - name: SGD
          description: Singapore dollar
        - name: SHP
          description: Saint Helena pound
        - name: SLL
          description: Sierra Leonean leone
        - name: SOS
          description: Somali shilling
        - name: SRD
          description: Surinamese dollar
        - name: SSP
          description: South Sudanese pound
        - name: STD
          description: São Tomé and Príncipe dobra
        - name: SVC
          description: Salvadoran colón
        - name: SYP
          description: Syrian pound
        - name: SZL
          description: Swazi lilangeni
        - name: THB
          description: Thai baht
        - name: TJS
          description: Tajikstani somoni
        - name: TMT
          description: Turkmenistan manat
        - name: TND
          description: Tunisian dinar
        - name: TOP
          description: Tongan pa'anga
        - name: TRY
          description: Turkish lira
        - name: TTD
          description: Trinidad and Tobago dollar
        - name: TWD
          description: New Taiwan dollar
        - name: TZS
          description: Tanzanian shilling
        - name: UAH
          description: Ukrainian hryvnia
        - name: UGX
          description: Ugandan shilling
        - name: USD
          description: United States dollar
        - name: USN
          description: United States dollar (next day)
        - name: USS
          description: United States dollar (same day)
        - name: UYI
          description: Uruguay Peso en Unidedades Indexadas
        - name: UYU
          description: Uruguyan peso
        - name: UZS
          description: Uzbekistan som
        - name: VEF
          description: Venezuelan bolívar soberano
        - name: VND
          description: Vietnamese đồng
        - name: VUV
          description: Vanuatu vatu
        - name: WST
          description: Samoan tala
        - name: XAF
          description: CFA franc BEAC
        - name: XAG
          description: Silver
        - name: XAU
          description: Gold
        - name: XBA
          description: European Composite Unit
        - name: XBB
          description: European Monetary Unit
        - name: XBC
          description: European Unit of Account 9
        - name: XBD
          description: European Unit of Account 17
        - name: XCD
          description: East Caribbean dollar
        - name: XDR
          description: Special drawing rights (International Monetary Fund)
        - name: XOF
          description: CFA franc BCEAO
        - name: XPD
          description: Palladium
        - name: XPF
          description: CFP franc
        - name: XPT
          description: Platinum
        - name: XTS
          description: Code reserved for testing
        - name: XXX
          description: No currency
        - name: YER
          description: Yemeni rial
        - name: ZAR
          description: South African rand
        - name: ZMK
          description: Zambian kwacha
        - name: ZMW
          description: Zambian kwacha
        - name: BTC
          description: Bitcoin
        - name: ETH
          description: Ether
      nullable: true
    CurrencyRate:
      type: number
      title: Currency Exchange Rate
      description: Currency Exchange Rate at the time entity was recorded/generated.
      nullable: true
      example: 0.69
    CustomField:
      type: object
      x-apideck-schema-id: CustomField
      additionalProperties: false
      anyOf:
        - required:
            - id
        - required:
            - name
      x-apideck-strict-any-of:
        - required:
            - id
        - required:
            - name
      x-apideck-weights:
        id: critical
        value: critical
        name: medium
        description: edge-case
      properties:
        id:
          title: ID
          description: Unique identifier for the custom field.
          type: string
          example: '2389328923893298'
          nullable: true
        name:
          title: Name
          type: string
          description: Name of the custom field.
          example: employee_level
          nullable: true
        description:
          title: Description
          type: string
          description: More information about the custom field
          example: Employee Level
          nullable: true
        value:
          anyOf:
            - type: string
              example: Uses Salesforce and Marketo
              nullable: true
            - type: number
              example: 10
              nullable: true
            - type: boolean
              example: true
              nullable: true
            - type: object
              example:
                foo: bar
              nullable: true
              additionalProperties: true
            - type: array
              items:
                anyOf:
                  - type: string
                    example: Uses Salesforce and Marketo
                    nullable: true
                  - type: number
                    example: 10
                    nullable: true
                  - type: boolean
                    example: true
                    nullable: true
                  - type: object
                    example:
                      foo: bar
                    nullable: true
                    additionalProperties: true
    Customer:
      type: object
      x-apideck-schema-id: Customer
      x-apideck-weights:
        id: critical
        downstream_id: edge-case
        display_id: edge-case
        display_name: edge-case
        company_name: high
        company_id: medium
        customer_category: edge-case
        title: high
        first_name: high
        middle_name: low
        last_name: high
        suffix: low
        individual: medium
        addresses: high
        phone_numbers: high
        emails: high
        websites: medium
        bank_accounts: high
        notes: low
        tax_rate: medium
        tax_number: medium
        taxable: medium
        currency: medium
        account: medium
        status: high
        payment_method: edge-case
        terms: edge-case
        terms_id: edge-case
        channel: edge-case
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: medium
        row_version: edge-case
      additionalProperties: false
      required:
        - id
      x-apideck-strict-required:
        - emails
        - addresses
        - phone_numbers
        - status
        - updated_at
      x-apideck-strict-any-of:
        - required:
            - first_name
            - last_name
        - required:
            - company_name
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          type: string
          title: Display ID
          description: Display ID
          example: EMP00101
          nullable: true
        display_name:
          type: string
          title: Display Name
          description: Display name
          example: Windsurf Shop
          nullable: true
        company_name:
          $ref: '#/components/schemas/CompanyName'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        customer_category:
          type: string
          title: Customer Category
          description: The category/type of the customer
          example: Insurance
          nullable: true
        title:
          $ref: '#/components/schemas/Title'
        first_name:
          $ref: '#/components/schemas/FirstName'
        middle_name:
          $ref: '#/components/schemas/MiddleName'
        last_name:
          $ref: '#/components/schemas/LastName'
        suffix:
          $ref: '#/components/schemas/Suffix'
        individual:
          type: boolean
          title: Is individual
          description: Is this an individual or business customer
          example: true
          nullable: true
        project:
          type: boolean
          title: Is project
          description: If true, indicates this is a Project.
          example: false
          nullable: true
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/Email'
        websites:
          type: array
          items:
            $ref: '#/components/schemas/Website'
        bank_accounts:
          type: array
          items:
            $ref: '#/components/schemas/BankAccount'
        notes:
          type: string
          title: Notes
          description: Some notes about this customer
          example: Some notes about this customer
          nullable: true
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tax_number:
          $ref: '#/components/schemas/TaxNumber'
        taxable:
          $ref: '#/components/schemas/Taxable'
        currency:
          $ref: '#/components/schemas/Currency'
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        parent:
          $ref: '#/components/schemas/LinkedParentCustomer'
        status:
          type: string
          title: Status
          description: Customer status
          nullable: true
          example: active
          x-apideck-enum-id: customers.status
          enum:
            - active
            - inactive
            - archived
            - gdpr-erasure-request
            - unknown
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        terms:
          type: string
          title: Terms
          description: Terms of payment.
          example: Net 30 days
          nullable: true
        terms_id:
          $ref: '#/components/schemas/TermsId'
        channel:
          $ref: '#/components/schemas/Channel'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    CustomersFilter:
      type: object
      x-apideck-schema-id: CustomersFilter
      example:
        company_name: SpaceX
        display_name: Elon Musk
        first_name: Elon
        last_name: Musk
        email: elon@musk.com
        status: active
        updated_since: '2020-09-30T07:43:32.000Z'
        supplier_id: '123'
      properties:
        company_name:
          type: string
          title: Company Name
          description: Company Name of customer to search for
          example: SpaceX
        display_name:
          type: string
          title: Display Name
          description: Display Name of customer to search for
          example: Techno King
        first_name:
          type: string
          title: First Name
          description: First name of customer to search for
          example: Elon
        last_name:
          type: string
          title: Last Name
          description: Last name of customer to search for
          example: Musk
        email:
          type: string
          title: Email
          description: Email of customer to search for
          example: elon@spacex.com
        status:
          type: string
          title: Status
          description: Status of customer to filter on
          nullable: true
          example: active
          x-apideck-enum-id: customers.status
          enum:
            - active
            - inactive
            - archived
            - all
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        supplier_id:
          type: string
          title: Supplier ID
          description: Supplier ID of customer to search for
          example: '123'
      additionalProperties: false
    CustomersSort:
      type: object
      x-apideck-schema-id: CustomersSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: customers.sort_by
          description: The field on which to sort the Customers
          enum:
            - created_at
            - updated_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    DeleteBankAccountResponse:
      type: object
      x-apideck-schema-id: DeleteBankAccountResponse
      additionalProperties: false
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-accounts
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
    DeleteBillResponse:
      type: object
      x-apideck-schema-id: DeleteBillResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: bills
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteCreditNoteResponse:
      type: object
      x-apideck-schema-id: DeleteCreditNoteResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: credit-notes
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteCustomerResponse:
      type: object
      x-apideck-schema-id: DeleteCustomerResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: customers
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteInvoiceItemResponse:
      $ref: '#/components/schemas/DeleteTaxRateResponse'
    DeleteInvoiceResponse:
      type: object
      x-apideck-schema-id: DeleteInvoiceResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoices
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/InvoiceResponse'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteJournalEntryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: journal-entries
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteLedgerAccountResponse:
      type: object
      x-apideck-schema-id: DeleteLedgerAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: ledger-accounts
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeletePaymentResponse:
      type: object
      x-apideck-schema-id: DeletePaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeletePurchaseOrderResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: PurchaseOrders
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteSubsidiaryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteSupplierResponse:
      type: object
      x-apideck-schema-id: DeleteSupplierResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: suppliers
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteTaxRateResponse:
      type: object
      x-apideck-schema-id: DeleteTaxRateResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: tax-rates
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    AccountingDepartment:
      type: object
      x-apideck-schema-id: AccountingDepartment
      x-apideck-weights:
        id: medium
        parent_id: low
        name: critical
        status: critical
        subsidiaries: low
        display_id: medium
        code: low
        downstream_id: low
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        parent_id:
          $ref: '#/components/schemas/WritableId'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        name:
          type: string
          title: Department name
          description: The name of the department.
          example: Sales
          nullable: true
        status:
          type: string
          title: Department status
          description: Based on the status some functionality is enabled or disabled.
          x-apideck-enum-id: department.status
          enum:
            - active
            - inactive
          example: active
        subsidiaries:
          type: array
          items:
            $ref: '#/components/schemas/SubsidiaryReference'
        code:
          type: string
          title: Department code
          description: The code of the department.
          example: '123'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    AccountingDepartmentsFilter:
      type: object
      x-apideck-schema-id: AccountingDepartmentsFilter
      example:
        subsidiary: '1'
      properties:
        subsidiary:
          type: string
          title: Subsidiary Id
          description: Id of the subsidiary to search for
          example: '1'
      additionalProperties: false
    AccountingLocationsFilter:
      type: object
      x-apideck-schema-id: AccountingLocationsFilter
      example:
        subsidiary: '1'
      properties:
        subsidiary:
          type: string
          title: Subsidiary Id
          description: Id of the subsidiary to search for
          example: '1'
      additionalProperties: false
    DiscountPercentage:
      type: number
      title: Discount Percentage
      description: Discount percentage applied to this transaction.
      example: 5.5
      nullable: true
    DownstreamId:
      type: string
      description: The third-party API ID of original entity
      example: '12345'
      nullable: true
      readOnly: true
    DueDate:
      type: string
      title: Due date
      description: The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD.
      format: date
      example: '2020-10-30'
      nullable: true
    Email:
      type: object
      x-apideck-schema-id: Email
      required:
        - email
      additionalProperties: false
      x-apideck-weights:
        email: critical
        type: critical
        id: edge-case
      properties:
        id:
          type: string
          example: '123'
          description: Unique identifier for the email address
          nullable: true
        email:
          type: string
          format: email
          description: Email address
          example: elon@musk.com
          minLength: 1
          nullable: true
        type:
          type: string
          description: Email type
          x-apideck-enum-id: emails.type
          enum:
            - primary
            - secondary
            - work
            - personal
            - billing
            - other
          example: primary
          nullable: true
    FirstName:
      type: string
      title: First name
      description: The first name of the person.
      example: Elon
      nullable: true
    Gender:
      type: string
      x-apideck-enum-id: genders
      title: Gender
      description: The gender represents the gender identity of a person.
      enum:
        - male
        - female
        - unisex
        - other
        - not_specified
      example: male
      nullable: true
    GetBalanceSheetResponse:
      type: object
      x-apideck-schema-id: GetBalanceSheetResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: BalanceSheets
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/BalanceSheet'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBillResponse:
      type: object
      x-apideck-schema-id: GetBillResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: bills
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Bill'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBillsResponse:
      type: object
      x-apideck-schema-id: GetBillsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: bills
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Bill'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCompanyInfoResponse:
      type: object
      x-apideck-schema-id: GetCompanyInfoResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: company-info
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/CompanyInfo'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCompaniesResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: companies
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountingConnectionCompany'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
    GetCreditNoteResponse:
      type: object
      x-apideck-schema-id: GetCreditNoteResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: credit-notes
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/CreditNote'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCreditNotesResponse:
      type: object
      x-apideck-schema-id: GetCreditNotesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: credit-notes
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/CreditNote'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBankAccountResponse:
      type: object
      x-apideck-schema-id: GetBankAccountResponse
      additionalProperties: false
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-accounts
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/AccountingBankAccount'
    GetBankAccountsResponse:
      type: object
      x-apideck-schema-id: GetBankAccountsResponse
      additionalProperties: false
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-accounts
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountingBankAccount'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
    GetCustomerResponse:
      type: object
      x-apideck-schema-id: GetCustomerResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: customers
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Customer'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCustomersResponse:
      type: object
      x-apideck-schema-id: GetCustomersResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: customers
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Customer'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetInvoiceItemResponse:
      type: object
      x-apideck-schema-id: GetInvoiceItemResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoice-items
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/InvoiceItem'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetInvoiceItemsResponse:
      type: object
      x-apideck-schema-id: GetInvoiceItemsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoice-items
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceItem'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetInvoiceResponse:
      type: object
      x-apideck-schema-id: GetInvoiceResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoices
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Invoice'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetInvoicesResponse:
      type: object
      x-apideck-schema-id: GetInvoicesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoices
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Invoice'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetJournalEntriesResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: journal-entries
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/JournalEntry'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetJournalEntryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: journal-entries
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/JournalEntry'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetLedgerAccountResponse:
      type: object
      x-apideck-schema-id: GetLedgerAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: ledger-accounts
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/LedgerAccount'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetLedgerAccountsResponse:
      type: object
      x-apideck-schema-id: GetLedgerAccountsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: ledger-accounts
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/LedgerAccount'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetPaymentResponse:
      type: object
      x-apideck-schema-id: GetPaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Payment'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetPaymentsResponse:
      type: object
      x-apideck-schema-id: GetPaymentsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetProfitAndLossResponse:
      type: object
      x-apideck-schema-id: GetProfitAndLossResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: ProfitAndLosses
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/ProfitAndLoss'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetPurchaseOrderResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: PurchaseOrders
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/PurchaseOrder'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetPurchaseOrdersResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: PurchaseOrders
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/PurchaseOrder'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateSubsidiaryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetSubsidiariesResponse:
      type: object
      x-apideck-schema-id: GetSubsidiariesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Subsidiary'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetSubsidiaryResponse:
      type: object
      x-apideck-schema-id: GetSubsidiaryResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Subsidiary'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetAccountingLocationsResponse:
      type: object
      x-apideck-schema-id: GetAccountingLocationsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountingLocation'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetAccountingLocationResponse:
      type: object
      x-apideck-schema-id: GetAccountingLocationResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/AccountingLocation'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateAccountingLocationResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: locations
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteAccountingLocationResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: locations
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateAccountingLocationResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: locations
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetAccountingDepartmentsResponse:
      type: object
      x-apideck-schema-id: GetAccountingDepartmentsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountingDepartment'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetAccountingDepartmentResponse:
      type: object
      x-apideck-schema-id: GetAccountingDepartmentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/AccountingDepartment'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateAccountingDepartmentResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: departments
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteAccountingDepartmentResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: departments
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateAccountingDepartmentResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: departments
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetSupplierResponse:
      type: object
      x-apideck-schema-id: GetSupplierResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: suppliers
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Supplier'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetSuppliersResponse:
      type: object
      x-apideck-schema-id: GetSuppliersResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: suppliers
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Supplier'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetTaxRateResponse:
      type: object
      x-apideck-schema-id: GetTaxRateResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: tax-rates
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/TaxRate'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetTaxRatesResponse:
      type: object
      x-apideck-schema-id: GetTaxRatesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: tax-rates
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaxRate'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    Id:
      type: string
      title: ID
      description: A unique identifier for an object.
      example: '12345'
      readOnly: true
    Invoice:
      type: object
      x-apideck-schema-id: Invoice
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: low
        display_id: low
        type: high
        number: high
        customer: high
        company_id: middle
        location_id: low
        department_id: low
        invoice_date: edge-case
        due_date: edge-case
        terms: low
        terms_id: edge-case
        po_number: low
        reference: low
        status: critical
        invoice_sent: low
        currency: medium
        currency_rate: low
        tax_inclusive: low
        sub_total: high
        total_tax: high
        tax_code: medium
        discount_percentage: medium
        discount_amount: medium
        total: critical
        balance: high
        deposit: low
        customer_memo: low
        line_items: critical
        billing_address: high
        shipping_address: medium
        template_id: edge-case
        source_document_url: edge-case
        payment_method: low
        channel: low
        language: low
        accounting_by_row: edge-case
        bank_account: low
        ledger_account: edge-case
        tracking_category: low
        tracking_categories: low
        row_version: edge-case
        custom_fields: medium
        updated_by: low
        created_by: low
        created_at: high
        updated_at: high
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        type:
          type: string
          title: Invoice type
          description: Invoice type
          x-apideck-enum-id: invoices.type
          enum:
            - standard
            - credit
            - service
            - product
            - supplier
            - other
          example: service
          nullable: true
        number:
          type: string
          title: Invoice number
          description: Invoice number.
          example: OIT00546
          nullable: true
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        location_id:
          $ref: '#/components/schemas/LocationId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        invoice_date:
          type: string
          title: Invoice date
          description: Date invoice was issued - YYYY-MM-DD.
          format: date
          example: '2020-09-30'
          nullable: true
        due_date:
          type: string
          title: Due date
          description: The invoice due date is the date on which a payment or invoice is scheduled to be received by the seller - YYYY-MM-DD.
          format: date
          example: '2020-09-30'
          nullable: true
        terms:
          type: string
          title: Terms
          description: Terms of payment.
          example: Net 30 days
          nullable: true
        terms_id:
          $ref: '#/components/schemas/TermsId'
        po_number:
          type: string
          title: Purchase Order number
          description: A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order.
          example: '90000117'
          nullable: true
        reference:
          $ref: '#/components/schemas/Reference'
        status:
          type: string
          title: Status
          description: Invoice status
          example: draft
          x-apideck-enum-id: invoices.status
          enum:
            - draft
            - submitted
            - authorised
            - partially_paid
            - paid
            - unpaid
            - void
            - credit
            - deleted
            - posted
          nullable: true
        invoice_sent:
          type: boolean
          title: Invoice Sent
          description: Invoice sent to contact/customer.
          example: true
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        sub_total:
          title: Sub-total amount
          description: Sub-total amount, normally before tax.
          type: number
          example: 27500
          nullable: true
        total_tax:
          type: number
          title: Total tax amount
          description: Total tax amount applied to this invoice.
          example: 2500
          nullable: true
        tax_code:
          type: string
          title: Tax Code
          description: Applicable tax id/code override if tax is not supplied on a line item basis.
          example: '1234'
          nullable: true
        discount_percentage:
          type: number
          title: Discount Percent
          description: Discount percentage applied to this invoice.
          example: 5.5
          nullable: true
        discount_amount:
          type: number
          title: Discount Amount
          description: Discount amount applied to this invoice.
          example: 25
          nullable: true
        total:
          type: number
          title: Total amount
          description: Total amount of invoice, including tax.
          example: 27500
          nullable: true
        balance:
          type: number
          title: Balance
          description: Balance of invoice due.
          example: 27500
          nullable: true
        deposit:
          type: number
          title: Deposit
          description: Amount of deposit made to this invoice.
          example: 0
          nullable: true
        customer_memo:
          type: string
          title: Customer memo
          description: Customer memo
          example: Thank you for your business and have a great day!
          nullable: true
        tracking_category:
          $ref: '#/components/schemas/DeprecatedLinkedTrackingCategory'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
        billing_address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
        template_id:
          type: string
          title: Template
          description: Optional invoice template
          example: '123456'
          nullable: true
        source_document_url:
          type: string
          title: Source document URL
          description: URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
          example: https://www.invoicesolution.com/invoice/123456
          nullable: true
        payment_allocations:
          type: array
          title: Payments
          description: IDs of payments made on the invoice
          items:
            type: object
            properties:
              id:
                type: string
                example: '123456'
                title: ID
                description: ID of the payment
                nullable: false
              allocated_amount:
                type: number
                example: 1000
                title: Amount
                description: Amount of the payment allocated to the invoice
                nullable: true
              date:
                type: string
                format: date-time
                title: Date
                description: Date of the payment
                example: '2020-09-30T07:43:32.000Z'
                nullable: true
          nullable: true
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        channel:
          $ref: '#/components/schemas/Channel'
        language:
          $ref: '#/components/schemas/Language'
        accounting_by_row:
          $ref: '#/components/schemas/AccountingByRow'
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    InvoiceItem:
      type: object
      x-apideck-schema-id: InvoiceItem
      x-apideck-weights:
        id: critical
        name: critical
        description: medium
        display_id: low
        code: high
        sold: edge-case
        purchased: edge-case
        tracked: edge-case
        taxable: edge-case
        inventory_date: high
        type: high
        sales_details: medium
        purchase_details: medium
        quantity: high
        unit_price: high
        currency: medium
        asset_account: medium
        income_account: high
        expense_account: medium
        active: medium
        tracking_category: low
        tracking_categories: low
        department_id: low
        location_id: low
        subsidiary_id: low
        category_id: edge-case
        tax_schedule_id: low
        row_version: edge-case
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: medium
      additionalProperties: false
      properties:
        id:
          title: Item ID
          description: The ID of the item.
          type: string
          example: '123456'
          readOnly: true
        name:
          type: string
          title: Item name
          description: Item name
          example: Model Y
          nullable: true
        description:
          type: string
          title: Description
          description: A short description of the item
          example: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
          nullable: true
        display_id:
          type: string
          title: Display ID
          description: Display ID of the item
          example: '12345'
          nullable: true
        code:
          type: string
          title: Item code
          description: User defined item code
          example: 120-C
          nullable: true
        sold:
          type: boolean
          title: Item sold
          description: Item will be available on sales transactions
          example: true
          nullable: true
        purchased:
          type: boolean
          title: Item purchased
          description: Item is available for purchase transactions
          example: true
          nullable: true
        tracked:
          type: boolean
          title: Item tracked
          description: Item is inventoried
          example: true
          nullable: true
        taxable:
          type: boolean
          title: Item taxable
          description: If true, transactions for this item are taxable
          example: true
          nullable: true
        inventory_date:
          type: string
          title: Inventory date
          description: The date of opening balance if inventory item is tracked - YYYY-MM-DD.
          format: date
          example: '2020-10-30'
          nullable: true
        type:
          type: string
          title: Type
          description: Item type
          example: inventory
          x-apideck-enum-id: invoice-items.type
          enum:
            - inventory
            - non_inventory
            - service
            - description
            - other
          nullable: true
        sales_details:
          x-apideck-weights:
            unit_price: medium
            unit_of_measure: medium
            tax_inclusive: medium
            tax_rate: medium
          type: object
          properties:
            unit_price:
              $ref: '#/components/schemas/UnitPrice'
            unit_of_measure:
              $ref: '#/components/schemas/UnitOfMeasure'
            tax_inclusive:
              $ref: '#/components/schemas/TaxInclusive'
            tax_rate:
              $ref: '#/components/schemas/LinkedTaxRate'
        purchase_details:
          x-apideck-weights:
            unit_price: medium
            unit_of_measure: medium
            tax_inclusive: medium
            tax_rate: medium
          type: object
          properties:
            unit_price:
              $ref: '#/components/schemas/UnitPrice'
            unit_of_measure:
              $ref: '#/components/schemas/UnitOfMeasure'
            tax_inclusive:
              $ref: '#/components/schemas/TaxInclusive'
            tax_rate:
              $ref: '#/components/schemas/LinkedTaxRate'
        quantity:
          $ref: '#/components/schemas/Quantity'
        unit_price:
          $ref: '#/components/schemas/UnitPrice'
        currency:
          $ref: '#/components/schemas/Currency'
        asset_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        income_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        expense_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        tracking_category:
          $ref: '#/components/schemas/DeprecatedLinkedTrackingCategory'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        active:
          $ref: '#/components/schemas/Active'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        location_id:
          $ref: '#/components/schemas/LocationId'
        subsidiary_id:
          $ref: '#/components/schemas/SubsidiaryId'
        category_id:
          type: string
          title: Category ID
          description: ID of the category of the item
          example: '12345'
          nullable: true
        tax_schedule_id:
          type: string
          title: Tax schedule ID
          description: The ID of the tax schedule
          example: '123456'
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    InvoiceItemAssetAccount:
      $ref: '#/components/schemas/LinkedLedgerAccount'
    InvoiceItemExpenseAccount:
      $ref: '#/components/schemas/LinkedLedgerAccount'
    InvoiceItemIncomeAccount:
      $ref: '#/components/schemas/LinkedLedgerAccount'
    InvoiceItemsFilter:
      type: object
      x-apideck-schema-id: InvoiceItemsFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        name: Widgets Large
        type: service
        transaction_type: sale
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        name:
          type: string
          title: Name
          description: Name of Invoice Items to search for
          example: Widgets Large
        type:
          type: string
          title: Invoice item type
          example: service
          description: The type of invoice item, indicating whether it is an inventory item, a service, or another type.
          x-apideck-enum-id: accounting.invoice_items_type
          enum:
            - inventory
            - service
            - other
          nullable: true
        transaction_type:
          type: string
          title: Transaction type
          example: sale
          description: The kind of transaction, indicating whether it is a sales transaction or a purchase transaction.
          x-apideck-enum-id: accounting.transaction_type
          enum:
            - sale
            - purchase
          nullable: true
      additionalProperties: false
    InvoiceItemFilter:
      type: object
      x-apideck-schema-id: InvoiceItemFilter
      example:
        type: service
        transaction_type: purchase
      properties:
        type:
          type: string
          title: Invoice item type
          example: service
          description: The type of invoice item, indicating whether it is an inventory item, a service, or another type.
          x-apideck-enum-id: accounting.invoice_item_type
          enum:
            - inventory
            - service
            - other
          nullable: true
        transaction_type:
          type: string
          title: Transaction type
          example: purchase
          description: The kind of transaction, indicating whether it is a sales transaction or a purchase transaction.
          x-apideck-enum-id: accounting.transaction_type
          enum:
            - sale
            - purchase
          nullable: true
      additionalProperties: false
    InvoiceItemsSort:
      type: object
      x-apideck-schema-id: InvoiceItemsSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: invoice_items.sort_by
          description: The field on which to sort the Invoice Items
          enum:
            - created_at
            - updated_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    InvoiceLineItem:
      type: object
      title: Invoice Line Item
      x-apideck-schema-id: InvoiceLineItem
      additionalProperties: false
      x-apideck-weights:
        id: high
        row_id: edge-case
        code: medium
        line_number: medium
        description: high
        type: medium
        tax_amount: high
        total_amount: high
        quantity: high
        unit_price: high
        unit_of_measure: edge-case
        discount_percentage: low
        discount_amount: low
        service_date: medium
        category_id: low
        location_id: low
        department_id: low
        subsidiary_id: edge-case
        shipping_id: edge-case
        memo: low
        prepaid: edge-case
        tax_applicable_on: edge-case
        tax_recoverability: edge-case
        tax_method: edge-case
        worktags: edge-case
        item: high
        tax_rate: medium
        ledger_account: low
        tracking_categories: low
        custom_fields: medium
        row_version: edge-case
        created_at: edge-case
        updated_at: high
        updated_by: edge-case
        created_by: edge-case
      properties:
        id:
          $ref: '#/components/schemas/WritableId'
        row_id:
          type: string
          title: Row ID
          description: Row ID
          example: '12345'
        code:
          type: string
          title: Item code
          description: User defined item code
          example: 120-C
          nullable: true
        line_number:
          $ref: '#/components/schemas/LineNumber'
        description:
          type: string
          title: Description
          description: User defined description
          example: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
          nullable: true
        type:
          type: string
          title: Type
          description: Item type
          example: sales_item
          x-apideck-enum-id: invoices.lines-items.type
          enum:
            - sales_item
            - discount
            - info
            - sub_total
            - service
            - other
          nullable: true
        tax_amount:
          type: number
          title: Tax amount
          description: Tax amount
          example: 27500
          nullable: true
        total_amount:
          type: number
          title: Total amount
          description: Total amount of the line item
          example: 27500
          nullable: true
        quantity:
          $ref: '#/components/schemas/Quantity'
        unit_price:
          $ref: '#/components/schemas/UnitPrice'
        unit_of_measure:
          $ref: '#/components/schemas/UnitOfMeasure'
        discount_percentage:
          type: number
          title: Discount Percentage
          description: Discount percentage applied to the line item when supported downstream.
          example: 0.01
          nullable: true
        discount_amount:
          type: number
          title: Discount Amount
          description: Discount amount applied to the line item when supported downstream.
          example: 19.99
          nullable: true
        service_date:
          type: string
          format: date
          title: Service Date
          description: Date on which the service was provided or performed - YYYY-MM-DD.
          example: '2024-01-15'
          nullable: true
        category_id:
          type: string
          title: Category ID
          description: ID of the category of the line item
          example: '12345'
          nullable: true
        location_id:
          $ref: '#/components/schemas/LocationId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        subsidiary_id:
          $ref: '#/components/schemas/SubsidiaryId'
        shipping_id:
          type: string
          title: Shipping ID
          description: ID of the shipping of the line item
          example: '12345'
          nullable: true
        memo:
          type: string
          title: Memo
          description: Memo
          example: Some memo
          nullable: true
        prepaid:
          type: boolean
          title: Prepaid
          description: Whether the line item is prepaid
          example: true
          nullable: true
        item:
          $ref: '#/components/schemas/LinkedInvoiceItem'
        tax_applicable_on:
          type: string
          title: Tax Applicable On
          description: Tax applicable on
          example: Domestic_Purchase_of_Goods_and_Services
          nullable: true
        tax_recoverability:
          type: string
          title: Tax Recoverability
          description: Tax recoverability
          example: Fully_Recoverable
          nullable: true
        tax_method:
          type: string
          title: Tax method
          description: Method of tax calculation
          example: Due_to_Supplier
          nullable: true
        worktags:
          type: array
          description: Worktags of the line item. This is currently only supported in Workday.
          items:
            $ref: '#/components/schemas/LinkedWorktag'
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
    InvoiceResponse:
      type: object
      x-apideck-schema-id: InvoiceResponse
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
    InvoicesFilter:
      type: object
      x-apideck-schema-id: InvoicesFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        created_since: '2020-09-30T07:43:32.000Z'
        number: OIT00546
        supplier_id: '123'
        id_since: '1'
      properties:
        id_since:
          type: string
          title: Since ID
          description: Return records with a row ID greater than or equal to the given value
          example: '1'
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        created_since:
          type: string
          title: Created since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        number:
          type: string
          title: Invoice number
          description: Invoice number to search for
          example: OIT00546
        supplier_id:
          type: string
          title: Supplier ID
          description: Supplier ID to filter invoices by
          example: '123'
      additionalProperties: false
    InvoicesSort:
      type: object
      x-apideck-schema-id: InvoicesSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: invoices.sort_by
          description: The field on which to sort the Invoices
          enum:
            - created_at
            - updated_at
            - id
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    JournalEntry:
      type: object
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: low
        source_id: low
        display_id: low
        title: medium
        currency_rate: low
        currency: medium
        company_id: medium
        line_items: medium
        status: medium
        memo: low
        posted_at: low
        journal_symbol: edge-case
        tax_type: edge-case
        tax_code: edge-case
        number: medium
        tracking_categories: low
        accounting_period: low
        source_type: edge-case
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: medium
        row_version: edge-case
        custom_fields: medium
        tax_inclusive: medium
      x-apideck-strict-required:
        - line_items
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          type: string
          title: Display ID
          description: Display ID of the journal entry
          example: '12345'
          nullable: true
        title:
          type: string
          title: Journal entry title
          description: Journal entry title
          example: 'Purchase Invoice-Inventory (USD): 2019/02/01 Batch Summary Entry'
          nullable: true
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        currency:
          $ref: '#/components/schemas/Currency'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        line_items:
          type: array
          minItems: 2
          description: Requires a minimum of 2 line items that sum to 0
          items:
            $ref: '#/components/schemas/JournalEntryLineItem'
        status:
          type: string
          title: Status
          description: Journal entry status
          example: draft
          x-apideck-enum-id: journal_entries.status
          enum:
            - draft
            - pending_approval
            - approved
            - posted
            - voided
            - rejected
            - deleted
            - other
          nullable: true
        memo:
          type: string
          title: Memo
          description: Reference for the journal entry.
          example: Thank you for your business and have a great day!
          nullable: true
        posted_at:
          type: string
          title: Posted at (timestamp)
          description: This is the date on which the journal entry was added. This can be different from the creation date and can also be backdated.
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        journal_symbol:
          type: string
          title: Journal symbol
          description: Journal symbol of the entry. For example IND for indirect costs
          example: IND
          nullable: true
        tax_type:
          type: string
          title: Tax Type
          description: 'Deprecated — use line_items[].tax_type for per-line tax applicability. Kept as fallback: applies to all lines that do not set their own tax_type.'
          example: sales
          nullable: true
          deprecated: true
        tax_code:
          $ref: '#/components/schemas/TaxCode'
        number:
          type: string
          title: Journal entry number
          description: Journal entry number.
          example: OIT00546
          nullable: true
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        accounting_period:
          $ref: '#/components/schemas/AccountingPeriod'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        source_type:
          type: string
          title: Source Type
          description: The source type of the journal entry
          example: manual
          nullable: true
        source_id:
          type: string
          title: Source ID
          description: A unique identifier for the source of the journal entry
          example: '12345'
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    JournalEntriesFilter:
      type: object
      x-apideck-schema-id: JournalEntriesFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        status: draft
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        status:
          type: string
          enum:
            - draft
            - pending_approval
            - approved
            - posted
            - voided
            - rejected
            - deleted
            - other
          x-apideck-enum-id: journal_entries.status
      additionalProperties: false
    JournalEntriesSort:
      type: object
      x-apideck-schema-id: JournalEntriesSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: journal_entries.sort_by
          description: The field on which to sort the Journal Entries.
          enum:
            - created_at
            - updated_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    JournalEntryLineItem:
      type: object
      x-apideck-schema-id: JournalEntryLineItem
      additionalProperties: false
      x-apideck-weights:
        id: high
        description: medium
        tax_amount: high
        sub_total: medium
        total_amount: high
        type: critical
        tax_rate: medium
        tax_type: edge-case
        tracking_category: low
        tracking_categories: low
        ledger_account: critical
        customer: medium
        supplier: medium
        department_id: edge-case
        location_id: edge-case
        line_number: low
        worktags: edge-case
      required:
        - ledger_account
        - type
      x-apideck-strict-required:
        - ledger_account
        - type
      x-apideck-strict-any-of:
        - required:
            - total_amount
        - required:
            - sub_total
      properties:
        id:
          $ref: '#/components/schemas/Id'
        description:
          type: string
          title: Description
          description: User defined description
          example: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
          nullable: true
        tax_amount:
          type: number
          title: Tax amount
          description: Tax amount
          example: 27500
          nullable: true
        sub_total:
          title: Sub-total amount
          description: Sub-total amount, normally before tax.
          type: number
          example: 27500
          nullable: true
        total_amount:
          type: number
          title: Total amount
          description: Debit entries are considered positive, and credit entries are considered negative.
          example: 27500
          nullable: true
        type:
          type: string
          enum:
            - debit
            - credit
          x-apideck-enum-id: JournalEntryLineItemType
          title: Type
          description: Debit entries are considered positive, and credit entries are considered negative.
          example: debit
          nullable: true
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tax_type:
          type: string
          x-apideck-enum-id: journal_entry_line_items.tax_type
          enum:
            - sales
            - purchase
          title: Tax Type
          description: The tax applicability of this line item. Overrides the root-level tax_type for this line.
          example: sales
          nullable: true
        tracking_category:
          $ref: '#/components/schemas/DeprecatedLinkedTrackingCategory'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        supplier:
          $ref: '#/components/schemas/LinkedSupplier'
        employee:
          $ref: '#/components/schemas/LinkedEmployee'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        location_id:
          $ref: '#/components/schemas/LocationId'
        line_number:
          $ref: '#/components/schemas/LineNumber'
        worktags:
          type: array
          description: Worktags of the line item. This is currently only supported in Workday.
          items:
            $ref: '#/components/schemas/LinkedWorktag'
    Language:
      type: string
      example: EN
      description: language code according to ISO 639-1. For the United States - EN
      nullable: true
    LastName:
      type: string
      title: Last name
      description: The last name of the person.
      example: Musk
      nullable: true
    LedgerAccount:
      type: object
      x-apideck-schema-id: LedgerAccount
      additionalProperties: false
      x-apideck-weights:
        id: critical
        display_id: low
        nominal_code: low
        code: low
        classification: edge-case
        type: high
        sub_type: edge-case
        name: high
        fully_qualified_name: edge-case
        description: edge-case
        opening_balance: edge-case
        current_balance: edge-case
        currency: edge-case
        tax_type: edge-case
        tax_rate: edge-case
        level: edge-case
        active: edge-case
        status: medium
        header: edge-case
        bank_account: high
        categories: high
        parent_account: high
        sub_account: medium
        sub_accounts: medium
        last_reconciliation_date: edge-case
        row_version: edge-case
        updated_by: edge-case
        created_by: edge-case
        subsidiaries: edge-case
        created_at: low
        updated_at: high
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          type: string
          title: Display ID
          description: The human readable display ID used when displaying the account
          example: 1-12345
        nominal_code:
          type: string
          title: Nominal Code
          description: The nominal code of the ledger account.
          example: N091
          nullable: true
          deprecated: true
        code:
          type: string
          title: Code
          description: The code assigned to the account.
          example: '453'
          nullable: true
        classification:
          type: string
          title: Classification
          description: The classification of account.
          x-apideck-enum-id: ledger-accounts.classification
          enum:
            - asset
            - equity
            - expense
            - liability
            - revenue
            - income
            - other_income
            - other_expense
            - costs_of_sales
            - other
          example: asset
          nullable: true
        type:
          type: string
          title: Type
          description: The type of account.
          x-apideck-enum-id: ledger-accounts.type
          enum:
            - accounts_payable
            - accounts_receivable
            - balancesheet
            - bank
            - costs_of_sales
            - credit_card
            - current_asset
            - current_liability
            - equity
            - expense
            - fixed_asset
            - non_current_asset
            - non_current_liability
            - other_asset
            - other_expense
            - other_income
            - other_liability
            - revenue
            - sales
            - other
          example: bank
        sub_type:
          type: string
          title: Sub Type
          description: The sub type of account.
          example: CHECKING_ACCOUNT
          nullable: true
        name:
          type: string
          title: Name
          description: The name of the account.
          example: Bank account
          nullable: true
        fully_qualified_name:
          type: string
          title: Fully Qualified Name
          description: The fully qualified name of the account.
          example: Asset.Bank.Checking_Account
          nullable: true
        description:
          type: string
          title: Description
          description: The description of the account.
          example: Main checking account
          nullable: true
        opening_balance:
          type: number
          title: Opening balance
          description: The opening balance of the account.
          example: 75000
          nullable: true
        current_balance:
          type: number
          title: Current balance
          description: The current balance of the account.
          example: 20000
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        tax_type:
          type: string
          title: Tax Type
          description: The tax type of the account.
          example: NONE
          nullable: true
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        level:
          type: number
          example: 1
          nullable: true
        active:
          type: boolean
          title: Is active
          description: Whether the account is active or not.
          example: true
          nullable: true
        status:
          type: string
          title: Account status
          description: The status of the account.
          x-apideck-enum-id: ledger-accounts.status
          enum:
            - active
            - inactive
            - archived
          example: active
          nullable: true
        header:
          type: boolean
          title: Is header
          description: Whether the account is a header or not.
          example: true
          nullable: true
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        categories:
          type: array
          title: Categories
          description: The categories of the account.
          readOnly: true
          items:
            type: object
            properties:
              id:
                type: string
                readOnly: true
                example: '12345'
              name:
                type: string
                title: Category name
                description: The name of the category.
                readOnly: true
                example: Finance Charges Expense
        parent_account:
          type: object
          properties:
            id:
              type: string
              title: Parent account ID
              description: The ID of the parent account.
              example: '12345'
            name:
              type: string
              title: Name
              description: The name of the parent account.
              example: Bank Accounts
            display_id:
              type: string
              title: Display ID
              description: The human readable display ID used when displaying the parent account
              example: 1-1100
        sub_account:
          type: boolean
          title: Is sub account
          description: Whether the account is a sub account or not.
          example: false
          nullable: true
        sub_accounts:
          type: array
          readOnly: true
          title: Sub accounts
          description: The sub accounts of the account.
          items:
            properties:
              id:
                type: string
                title: Sub account ID
                description: The ID of the sub account.
                readOnly: true
                example: '12345'
              account_sub_name:
                type: string
                title: Sub Account Name
                description: The name of the sub account.
                readOnly: true
                example: Petty Cash
        last_reconciliation_date:
          type: string
          title: Last Reconciliation Date
          description: Reconciliation Date means the last calendar day of each Reconciliation Period.
          format: date
          example: '2020-09-30'
          nullable: true
        subsidiaries:
          type: array
          title: Subsidiaries
          description: The subsidiaries the account belongs to.
          items:
            properties:
              id:
                type: string
                title: Subsidiary ID
                description: The ID of the subsidiary.
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    LedgerAccounts:
      items:
        $ref: '#/components/schemas/LedgerAccount'
      type: array
    LedgerAccountsFilter:
      type: object
      x-apideck-schema-id: LedgerAccountsFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        classification: asset
        name: Sales
      properties:
        name:
          type: string
          title: Name
          description: Filter by ledger account name
          example: Sales
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        classification:
          type: string
          title: Classification
          description: Filter by account classification.
          x-apideck-enum-id: ledger-accounts.classification
          enum:
            - asset
            - equity
            - expense
            - liability
            - revenue
            - income
            - other_income
            - other_expense
            - costs_of_sales
            - other
          example: asset
      additionalProperties: false
    LedgerAccountsSort:
      type: object
      x-apideck-schema-id: LedgerAccountsSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: ledger_accounts.sort_by
          description: The field on which to sort the Ledger Accounts
          enum:
            - created_at
            - updated_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    LinkedAttachment:
      type: object
      x-apideck-schema-id: LinkedAttachment
      x-apideck-weights:
        name: critical
        content: critical
        mime_type: medium
        is_compressed: low
        encoding: low
        notes: low
      nullable: true
      properties:
        name:
          type: string
          description: The name of the file
          example: sample.jpg
          nullable: true
        mime_type:
          type: string
          description: The MIME type of the file.
          example: image/jpeg
          nullable: true
        is_compressed:
          type: boolean
          description: Whether the file is c ompressed.
          example: false
          nullable: true
        encoding:
          type: string
          description: The encoding of the file.
          example: base64
          nullable: true
        content:
          type: string
          description: The content of the file.
          example: data:image/jpeg;base64,...
          nullable: true
        notes:
          type: string
          description: The notes of the file.
          example: A sample image
          nullable: true
    LinkedBankAccount:
      type: object
      x-apideck-schema-id: LinkedBankAccount
      additionalProperties: false
      nullable: true
      x-apideck-weights:
        id: medium
        name: medium
        account_number: medium
        bank_name: low
      properties:
        id:
          title: Bank Account ID
          description: The unique identifier for the bank account.
          type: string
          example: ba_123456
        name:
          $ref: '#/components/schemas/BankAccountName'
        account_number:
          $ref: '#/components/schemas/BankAccountNumber'
        bank_name:
          $ref: '#/components/schemas/BankName'
    LinkedCustomer:
      type: object
      x-apideck-schema-id: LinkedCustomer
      title: LinkedCustomer
      description: The customer this entity is linked to.
      x-apideck-weights:
        id: medium
        display_id: medium
        display_name: medium
        name: medium
        company_name: medium
      nullable: true
      properties:
        id:
          type: string
          title: Customer ID
          description: The ID of the customer this entity is linked to.
          example: '12345'
        display_id:
          type: string
          title: Display ID
          description: The display ID of the customer.
          example: CUST00101
          nullable: true
          readOnly: true
        display_name:
          type: string
          title: Display Name
          description: The display name of the customer.
          example: Windsurf Shop
          nullable: true
        name:
          type: string
          title: Name
          description: The name of the customer. Deprecated, use display_name instead.
          example: Windsurf Shop
          deprecated: true
        company_name:
          type: string
          title: Company Name
          description: The company name of the customer.
          example: The boring company
          nullable: true
          readOnly: true
        email:
          type: string
          title: Email
          description: The email address of the customer.
          example: boring@boring.com
    LinkedEmployee:
      type: object
      x-apideck-schema-id: LinkedEmployee
      title: LinkedEmployee
      description: The employee this entity is linked to.
      x-apideck-weights:
        id: medium
        display_id: medium
        display_name: medium
      nullable: true
      properties:
        id:
          type: string
          title: Employee ID
          description: A unique identifier for an object.
          example: '12345'
        display_id:
          type: string
          title: Display ID
          description: The display ID of the employee. For best performance, send this field (the employee number) instead of the GUID in the id field.
          example: EH
          nullable: true
        display_name:
          type: string
          title: Display Name
          description: The display name of the employee.
          example: Ester Henderson
          nullable: true
    LinkedExpenseCategory:
      type: object
      x-apideck-schema-id: LinkedExpenseCategory
      title: LinkedExpenseCategory
      description: The expense category this entity is linked to.
      x-apideck-weights:
        id: medium
        downstream_id: edge-case
        display_id: medium
        name: medium
      properties:
        id:
          type: string
          title: Expense Category ID
          description: The ID of the expense category.
          example: '12345'
        downstream_id:
          type: string
          title: Downstream ID
          description: The third-party API ID of the expense category.
          example: '12345'
          nullable: true
        display_id:
          type: string
          title: Display ID
          description: The display ID of the expense category.
          example: Airfare
          nullable: true
        name:
          type: string
          title: Name
          description: The name of the expense category.
          example: Airfare
          nullable: true
    LinkedInvoiceItem:
      type: object
      x-apideck-schema-id: LinkedInvoiceItem
      x-apideck-weights:
        id: medium
        code: medium
        name: medium
      properties:
        id:
          type: string
          title: Item ID
          description: ID of the linked item. A reference to the [invoice item](https://developers.apideck.com/apis/accounting/reference#tag/Invoice-Items) that was used to create this line item
          example: '12344'
          nullable: true
        code:
          type: string
          title: Item code
          description: User defined item code
          example: 120-C
          nullable: true
        name:
          type: string
          title: Item name
          description: User defined item name
          example: Model Y
          nullable: true
    LinkedLedgerAccount:
      type: object
      x-apideck-schema-id: LinkedLedgerAccount
      additionalProperties: false
      x-apideck-weights:
        id: medium
        nominal_code: medium
        code: medium
        name: medium
        parent_id: low
        display_id: low
      nullable: true
      properties:
        id:
          title: Account ID
          description: The unique identifier for the account.
          type: string
          example: '123456'
        name:
          type: string
          title: Account Name
          description: The name of the account.
          example: Bank account
          nullable: true
        nominal_code:
          type: string
          title: Nominal Code
          description: The nominal code of the account.
          example: N091
          nullable: true
        code:
          type: string
          title: Code
          description: The code assigned to the account.
          example: '453'
          nullable: true
        parent_id:
          type: string
          title: Parent ID
          description: The parent ID of the account.
          example: '123456'
          nullable: true
        display_id:
          type: string
          title: Display ID
          description: The display ID of the account.
          example: '123456'
          nullable: true
    LinkedFinancialAccount:
      type: object
      x-apideck-schema-id: LinkedFinancialAccount
      additionalProperties: false
      nullable: true
      description: A flexible account reference that can represent a ledger account (GL account), a bank account, or an employee payable account, depending on the connector's requirements.
      x-apideck-weights:
        id: critical
        type: high
        code: medium
        account_number: medium
        name: medium
        display_id: low
        downstream_id: low
      properties:
        id:
          type: string
          title: Account ID
          description: The unique identifier for the account. This can be a ledger account ID or bank account ID depending on the `type` field.
          example: '123456'
        type:
          type: string
          title: Account Type
          description: The type of account being referenced. Use `ledger_account` for GL accounts from the chart of accounts, or `bank_account` for bank account entities. When not specified, the connector will use its default behavior.
          x-apideck-enum-id: linked-financial-account.type
          enum:
            - ledger_account
            - bank_account
            - employee
          example: ledger_account
          nullable: true
        code:
          $ref: '#/components/schemas/AccountCode'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        account_number:
          $ref: '#/components/schemas/BankAccountNumber'
        name:
          $ref: '#/components/schemas/AccountName'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
    LinkedPurchaseOrder:
      type: object
      x-apideck-schema-id: LinkedPurchaseOrder
      x-apideck-weights:
        id: medium
        line_id: medium
        line_number: medium
      nullable: true
      properties:
        id:
          title: Purchase Order ID
          description: The unique identifier for the purchase order.
          type: string
          example: '123456'
        line_id:
          type: string
          title: Purchase Order Line ID
          description: The unique identifier for the purchase order line.
          example: '123456'
          nullable: true
        line_number:
          type: string
          title: Purchase Order Line Number
          description: The line number of the purchase order line.
          example: '1'
          nullable: true
    LinkedParentCustomer:
      type: object
      x-apideck-schema-id: LinkedParentCustomer
      title: LinkedParentCustomer
      description: The parent customer this entity is linked to.
      x-apideck-weights:
        id: critical
      nullable: true
      required:
        - id
      properties:
        id:
          type: string
          title: Customer ID
          description: The parent ID of the customer this entity is linked to.
          example: '12345'
        name:
          type: string
          title: Name
          description: The name of the parent customer.
          example: Windsurf Shop
    LinkedSupplier:
      type: object
      x-apideck-schema-id: LinkedSupplier
      title: LinkedSupplier
      description: The supplier this entity is linked to.
      x-apideck-weights:
        id: medium
        display_id: medium
        display_name: high
        company_name: edge-case
        address: low
      nullable: true
      properties:
        id:
          type: string
          title: Supplier ID
          description: The ID of the supplier this entity is linked to.
          example: '12345'
        display_id:
          type: string
          title: Display ID
          description: The display ID of the supplier.
          example: SUPP00101
          nullable: true
          readOnly: true
        display_name:
          type: string
          title: Display Name
          description: The display name of the supplier.
          example: Windsurf Shop
          nullable: true
        company_name:
          type: string
          title: Company Name
          description: The company name of the supplier.
          example: The boring company
          nullable: true
          readOnly: true
        address:
          $ref: '#/components/schemas/Address'
    LinkedTaxRate:
      type: object
      x-apideck-schema-id: LinkedTaxRate
      additionalProperties: false
      x-apideck-weights:
        id: medium
        code: medium
        name: medium
        rate: medium
      properties:
        id:
          type: string
          title: The ID of the object.
          description: The ID of the object.
          example: '123456'
          nullable: true
        code:
          type: string
          title: Tax rate code
          description: Tax rate code
          example: N-T
          nullable: true
        name:
          type: string
          title: Name
          description: Name of the tax rate
          example: GST on Purchases
          nullable: true
          readOnly: true
        rate:
          type: number
          title: Rate
          description: Rate of the tax rate
          example: 10
          nullable: true
    LinkedTrackingCategory:
      type: object
      x-apideck-schema-id: LinkedTrackingCategory
      x-apideck-weights:
        id: critical
        code: medium
      nullable: true
      properties:
        id:
          title: Tracking Category ID
          description: The unique identifier for the tracking category.
          type: string
          example: '123456'
        code:
          type: string
          title: Tracking Category Code
          description: The code of the tracking category.
          example: '100'
          nullable: true
        name:
          type: string
          title: Tracking Category Name
          description: The name of the tracking category.
          example: New York
          nullable: true
        parent_id:
          type: string
          title: Parent Tracking Category ID
          description: The unique identifier for the parent tracking category.
          example: '123456'
        parent_name:
          type: string
          title: Parent Tracking Category Name
          description: The name of the parent tracking category.
          example: New York
          nullable: true
    LinkedLocation:
      type: object
      x-apideck-schema-id: LinkedLocation
      x-apideck-weights:
        id: critical
        display_id: medium
        name: medium
        downstream_id: low
      nullable: true
      properties:
        id:
          title: Location ID
          description: The unique identifier for the location.
          type: string
          example: '123456'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        name:
          type: string
          title: Location Name
          description: The name of the location.
          example: New York Office
          nullable: true
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
    LinkedDepartment:
      type: object
      x-apideck-schema-id: LinkedDepartment
      x-apideck-weights:
        id: critical
        display_id: medium
        name: medium
        downstream_id: low
      nullable: true
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        name:
          $ref: '#/components/schemas/Name'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
    LinkedSubsidiary:
      type: object
      x-apideck-schema-id: LinkedSubsidiary
      x-apideck-weights:
        id: critical
        display_id: medium
        name: medium
      nullable: true
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        name:
          $ref: '#/components/schemas/Name'
    LinkedWorktag:
      type: object
      x-apideck-schema-id: LinkedWorktag
      x-apideck-weights:
        id: critical
        value: critical
      nullable: true
      properties:
        id:
          type: string
          title: Worktag ID
          description: The unique identifier for the worktag.
          example: '123456'
        value:
          type: string
          title: Worktag Value
          description: The value of the worktag.
          example: New York
          nullable: true
    LinkedTaxDetail:
      type: object
      x-apideck-schema-id: LinkedTaxDetail
      x-apideck-weights:
        type: low
        number: critical
        is_transaction_tax: low
        is_primary_tax: low
      nullable: true
      properties:
        type:
          type: string
          title: Tax Type
          description: The type of tax.
          example: GST on Purchases
        number:
          type: string
          title: Tax Number
          description: The number of the tax.
          example: '123456'
          nullable: true
        is_transaction_tax:
          type: boolean
          title: Is Transaction Tax
          description: Whether the tax is a transaction tax.
          example: true
        is_primary_tax:
          type: boolean
          title: Is Primary Tax
          description: Whether the tax is a primary tax.
          example: true
    LinkedTaxStatusDetail:
      type: object
      x-apideck-schema-id: LinkedTaxStatusDetail
      x-apideck-weights:
        country: critical
        transaction_tax_status: critical
      nullable: true
      properties:
        country:
          type: string
          title: Country
          description: The country of the tax status.
          example: US
        transaction_tax_status:
          type: string
          title: Transaction Tax Status
          description: The transaction tax status.
          example: taxable
          nullable: true
    DeprecatedLinkedTrackingCategory:
      type: object
      x-apideck-schema-id: DeprecatedLinkedTrackingCategory
      x-apideck-weights:
        id: critical
      nullable: true
      deprecated: true
      properties:
        id:
          title: Tracking Category ID
          description: The unique identifier for the tracking category.
          type: string
          example: '123456'
        name:
          type: string
          title: Tracking Category Name
          description: The name of the tracking category.
          example: New York
          nullable: true
    Links:
      type: object
      x-apideck-schema-id: Links
      description: Links to navigate to previous or next pages through the API
      properties:
        previous:
          type: string
          description: Link to navigate to the previous page through the API
          example: https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D
          nullable: true
        current:
          type: string
          description: Link to navigate to the current page through the API
          example: https://unify.apideck.com/crm/companies
        next:
          type: string
          description: Link to navigate to the previous page through the API
          example: https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM
          nullable: true
    AccountingLocation:
      type: object
      x-apideck-schema-id: AccountingLocation
      x-apideck-weights:
        id: medium
        parent_id: low
        company_name: medium
        display_name: critical
        display_id: medium
        downstream_id: low
        status: critical
        addresses: low
        subsidiaries: low
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        parent_id:
          $ref: '#/components/schemas/WritableId'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        company_name:
          $ref: '#/components/schemas/CompanyName'
        display_name:
          type: string
          title: Location display name
          description: The display name of the location.
          example: 11 UT - South Jordan
          nullable: true
        status:
          type: string
          title: Location status
          description: Based on the status some functionality is enabled or disabled.
          x-apideck-enum-id: location.status
          enum:
            - active
            - inactive
          example: active
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        subsidiaries:
          type: array
          items:
            $ref: '#/components/schemas/SubsidiaryReference'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    Meta:
      type: object
      x-apideck-schema-id: Meta
      description: Response metadata
      properties:
        items_on_page:
          type: integer
          description: Number of items returned in the data property of the response
          example: 50
        cursors:
          type: object
          description: Cursors to navigate to previous or next pages through the API
          properties:
            previous:
              type: string
              description: Cursor to navigate to the previous page of results through the API
              example: em9oby1jcm06OnBhZ2U6OjE=
              nullable: true
            current:
              type: string
              description: Cursor to navigate to the current page of results through the API
              example: em9oby1jcm06OnBhZ2U6OjI=
              nullable: true
            next:
              type: string
              description: Cursor to navigate to the next page of results through the API
              example: em9oby1jcm06OnBhZ2U6OjM=
              nullable: true
    MiddleName:
      type: string
      title: Middle name
      description: Middle name of the person.
      example: D.
      nullable: true
    Name:
      type: string
      title: Name
      description: The name of the resource.
      example: Acme Inc.
      nullable: true
    NotFoundResponse:
      type: object
      x-apideck-schema-id: NotFound
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 404
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Not Found
        type_name:
          type: string
          description: The type of error returned
          example: EntityNotFoundError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Unknown Widget
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: "Could not find widget with id: '123'"
            - type: object
              x-speakeasy-detail: true
              example:
                not_found:
                  entity: widget
                  id: '123'
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#entitynotfounderror
    NotImplementedResponse:
      type: object
      x-apideck-schema-id: NotImplemented
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 501
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Not Implemented
        type_name:
          type: string
          description: The type of error returned
          example: MappingError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Unmapped Attribute
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Failed to retrieve Widget tokenUrl from 'components.securitySchemes.OAuth2.flows'
            - type: object
              x-speakeasy-detail: true
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#mappingerror
    PassThroughBody:
      type: array
      description: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
      items:
        type: object
        properties:
          service_id:
            type: string
            description: Identifier for the service to which this pass_through should be applied.
          operation_id:
            type: string
            description: Optional identifier for a workflow operation to which this pass_through should be applied. This is useful for Unify calls that are making more than one downstream request.
          extend_object:
            type: object
            additionalProperties: true
            description: Simple object allowing any properties for direct extension.
          extend_paths:
            type: array
            description: Array of objects for structured data modifications via paths.
            items:
              type: object
              properties:
                path:
                  type: string
                  description: JSONPath string specifying where to apply the value.
                  example: $.nested.property
                value:
                  description: The value to set at the specified path, can be any type.
                  example: &ref_0
                    TaxClassificationRef:
                      value: EUC-99990201-V1-00020000
              required:
                - path
                - value
              additionalProperties: false
        required:
          - service_id
        additionalProperties: false
        writeOnly: true
    PassThroughQuery:
      type: object
      additionalProperties: true
      properties:
        example_downstream_property:
          type: string
          description: All passthrough query parameters are passed along to the connector as is (?pass_through[search]=leads becomes ?search=leads)
      example:
        search: San Francisco
    Payment:
      type: object
      x-apideck-schema-id: Payment
      x-apideck-weights:
        id: critical
        downstream_id: medium
        currency: critical
        currency_rate: medium
        total_amount: critical
        reference: medium
        payment_method: medium
        payment_method_reference: medium
        payment_method_id: edge-case
        accounts_receivable_account_type: edge-case
        accounts_receivable_account_id: edge-case
        account: critical
        transaction_date: critical
        customer: high
        supplier: high
        company_id: medium
        reconciled: low
        status: high
        type: high
        allocations: critical
        note: low
        number: medium
        tracking_categories: low
        custom_fields: medium
        row_version: edge-case
        display_id: low
        updated_by: edge-case
        created_by: edge-case
        created_at: medium
        updated_at: medium
      required:
        - id
        - total_amount
        - transaction_date
      x-apideck-strict-required:
        - total_amount
        - transaction_date
        - allocations
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        total_amount:
          $ref: '#/components/schemas/TotalAmount'
        reference:
          $ref: '#/components/schemas/TransactionReference'
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_reference:
          $ref: '#/components/schemas/PaymentMethodReference'
        payment_method_id:
          $ref: '#/components/schemas/WritableId'
        accounts_receivable_account_type:
          deprecated: true
          type: string
          title: Type of accounts receivable account
          description: Type of accounts receivable account.
          example: Account
          nullable: true
        accounts_receivable_account_id:
          deprecated: true
          type: string
          title: Accounts receivable account id
          description: Unique identifier for the account to allocate payment to.
          example: '123456'
          nullable: true
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        transaction_date:
          $ref: '#/components/schemas/TransactionDate'
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        supplier:
          $ref: '#/components/schemas/DeprecatedLinkedSupplier'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        reconciled:
          $ref: '#/components/schemas/IsReconciled'
        status:
          $ref: '#/components/schemas/PaymentStatus'
        type:
          $ref: '#/components/schemas/PaymentType'
        allocations:
          type: array
          items:
            $ref: '#/components/schemas/Allocation'
        note:
          $ref: '#/components/schemas/TransactionNote'
        number:
          $ref: '#/components/schemas/TransactionNumber'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    PaymentMethod:
      type: string
      title: Payment method
      description: Payment method used for the transaction, such as cash, credit card, bank transfer, or check
      nullable: true
      example: cash
    PaymentRequiredResponse:
      type: object
      x-apideck-schema-id: PaymentRequired
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 402
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Payment Required
        type_name:
          type: string
          description: The type of error returned
          example: RequestLimitError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Request Limit Reached
          x-speakeasy-error-message: true
        detail:
          type: string
          description: Contains parameter or domain specific information related to the error and why it occurred.
          example: You have reached your limit of 2000
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#requestlimiterror
    PaymentsFilter:
      type: object
      x-apideck-schema-id: PaymentsFilter
      x-graphql-type-name: PaymentsFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        invoice_id: '123'
        bill_id: '123'
        supplier_id: '123'
        customer_id: 123abc
        type: accounts_receivable
        status: authorised
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        invoice_id:
          type: string
          title: Invoice ID
          example: '123'
        bill_id:
          type: string
          title: Bill ID
          example: '123'
        supplier_id:
          type: string
          title: Supplier ID
          example: '123'
        customer_id:
          type: string
          title: Customer Id
          description: Filter by customer id
          example: 123abc
        type:
          type: string
          x-apideck-enum-id: payments.type
          enum:
            - accounts_receivable
            - accounts_payable
            - accounts_receivable_credit
            - accounts_payable_credit
            - accounts_receivable_overpayment
            - accounts_payable_overpayment
            - accounts_receivable_prepayment
            - accounts_payable_prepayment
          example: accounts_receivable
        status:
          type: string
          title: Payment status
          description: Filter by payment status
          x-apideck-enum-id: payments.status
          enum:
            - draft
            - authorised
            - rejected
            - paid
            - voided
            - deleted
          example: authorised
      additionalProperties: false
    PaymentsSort:
      type: object
      x-apideck-schema-id: PaymentsSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: payments.sort_by
          description: The field on which to sort the Payments
          enum:
            - updated_at
            - created_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    PhoneNumber:
      type: object
      x-apideck-schema-id: PhoneNumber
      required:
        - number
      additionalProperties: false
      x-apideck-weights:
        number: critical
        type: critical
        id: edge-case
        country_code: edge-case
        area_code: edge-case
        extension: edge-case
      properties:
        id:
          type: string
          description: Unique identifier of the phone number
          example: '12345'
          nullable: true
        country_code:
          title: Country code
          description: The country code of the phone number, e.g. +1
          type: string
          example: '1'
          nullable: true
        area_code:
          title: Area code
          description: The area code of the phone number, e.g. 323
          type: string
          example: '323'
          nullable: true
        number:
          type: string
          title: Phone number
          description: The phone number
          example: 111-111-1111
          minLength: 1
        extension:
          type: string
          title: Phone extension
          description: The extension of the phone number
          example: '105'
          nullable: true
        type:
          type: string
          description: The type of phone number
          x-apideck-enum-id: phone_numbers.type
          enum:
            - primary
            - secondary
            - home
            - work
            - office
            - mobile
            - assistant
            - fax
            - direct-dial-in
            - personal
            - billing
            - other
          example: primary
          nullable: true
    ProfitAndLoss:
      type: object
      x-apideck-schema-id: ProfitAndLoss
      x-apideck-circular-ref: true
      x-apideck-weights:
        id: medium
        report_name: medium
        start_date: low
        end_date: low
        currency: critical
        income: critical
        cost_of_goods_sold: high
        expenses: critical
        other_income: high
        other_expenses: high
        uncategorized_accounts: low
        gross_profit: medium
        net_operating_income: medium
        net_income: high
        customer: low
      additionalProperties: false
      required:
        - report_name
        - income
        - expenses
      properties:
        id:
          $ref: '#/components/schemas/Id'
        report_name:
          type: string
          description: The name of the report
          title: Report Name
          example: ProfitAndLoss
        start_date:
          type: string
          description: The start date of the report
          title: Start Date
          pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2017-01-01'
        end_date:
          type: string
          description: The end date of the report
          title: End Date
          pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2017-01-31'
        currency:
          $ref: '#/components/schemas/Currency'
        income:
          x-apideck-weights:
            id: medium
            code: medium
            title: high
            type: medium
            total: critical
            records: critical
          type: object
          title: Income
          description: The operating income accounts
          required:
            - total
            - records
          properties:
            id:
              $ref: '#/components/schemas/Id'
            code:
              $ref: '#/components/schemas/AccountCode'
            title:
              $ref: '#/components/schemas/AccountName'
            type:
              $ref: '#/components/schemas/ProfitAndLossType'
            total:
              $ref: '#/components/schemas/TotalPLAmount'
            records:
              $ref: '#/components/schemas/ProfitAndLossRecords'
          example:
            id: '123'
            code: '123'
            title: Operating Income
            type: Section
            total: 60000
            records:
              - id: '137'
                title: Sales of products
                code: '137'
                type: Section
                total: 20000
                records:
                  - id: '13701'
                    title: Sales of products
                    code: '13701'
                    type: Record
                    total: 20000
              - id: '138'
                title: Sales of services
                code: '138'
                type: Section
                total: 40000
                records:
                  - id: '789'
                    code: '789'
                    title: Sales of External Services
                    type: Record
                    total: 10000
                  - id: '101'
                    code: '101'
                    title: Sales of Internal Services
                    type: Record
                    total: 30000
        cost_of_goods_sold:
          x-apideck-weights:
            id: medium
            code: medium
            title: high
            type: medium
            total: critical
            records: critical
          type: object
          title: Cost of Goods Sold
          description: The cost of goods sold accounts
          required:
            - records
          properties:
            id:
              $ref: '#/components/schemas/Id'
            code:
              $ref: '#/components/schemas/AccountCode'
            title:
              $ref: '#/components/schemas/AccountName'
            type:
              $ref: '#/components/schemas/ProfitAndLossType'
            total:
              $ref: '#/components/schemas/TotalPLAmount'
            records:
              $ref: '#/components/schemas/ProfitAndLossRecords'
          example:
            id: '123'
            code: '123'
            title: Cost of Goods Sold
            type: Section
            total: 12000
            records:
              - id: '123'
                code: '123'
                title: COGS Sales
                type: Record
                total: 12000
        expenses:
          x-apideck-weights:
            id: medium
            code: medium
            title: high
            type: medium
            total: critical
            records: critical
          type: object
          title: Expenses
          description: The operating expenses accounts
          required:
            - total
            - records
          properties:
            id:
              $ref: '#/components/schemas/Id'
            code:
              $ref: '#/components/schemas/AccountCode'
            title:
              $ref: '#/components/schemas/AccountName'
            type:
              $ref: '#/components/schemas/ProfitAndLossType'
            total:
              $ref: '#/components/schemas/TotalPLAmount'
            records:
              $ref: '#/components/schemas/ProfitAndLossRecords'
          example:
            id: '123'
            code: '123'
            title: Operating Expenses
            type: Section
            total: 14000
            records:
              - id: '137'
                title: Maintenance
                code: '137'
                type: Record
                total: 1000
              - id: '138'
                title: Rent
                code: '138'
                type: Record
                total: 10000
              - id: '789'
                code: '789'
                title: Utilities
                type: Section
                total: 3000
                records:
                  - id: '101'
                    code: '101'
                    title: Electricity
                    type: Record
                    total: 2000
                  - id: '102'
                    code: '102'
                    title: Telephone
                    type: Record
                    total: 1000
        other_income:
          x-apideck-weights:
            id: medium
            code: medium
            title: high
            type: medium
            total: critical
            records: critical
          type: object
          title: Other Income
          description: The other income accounts
          required:
            - records
          properties:
            id:
              $ref: '#/components/schemas/Id'
            code:
              $ref: '#/components/schemas/AccountCode'
            title:
              $ref: '#/components/schemas/AccountName'
            type:
              $ref: '#/components/schemas/ProfitAndLossType'
            total:
              $ref: '#/components/schemas/TotalPLAmount'
            records:
              $ref: '#/components/schemas/ProfitAndLossRecords'
          example:
            id: '123'
            code: '123'
            title: Other Income
            type: Section
            total: 3000
            records:
              - id: '123'
                code: '123'
                title: Interest Income
                type: Record
                total: 2000
              - id: '123'
                code: '123'
                title: Foreign Exchange Gain
                type: Record
                total: 1000
        other_expenses:
          x-apideck-weights:
            id: medium
            code: medium
            title: high
            type: medium
            total: critical
            records: critical
          type: object
          title: Other Expenses
          description: The other expenses accounts
          required:
            - records
          properties:
            id:
              $ref: '#/components/schemas/Id'
            code:
              $ref: '#/components/schemas/AccountCode'
            title:
              $ref: '#/components/schemas/AccountName'
            type:
              $ref: '#/components/schemas/ProfitAndLossType'
            total:
              $ref: '#/components/schemas/TotalPLAmount'
            records:
              $ref: '#/components/schemas/ProfitAndLossRecords'
          example:
            id: '123'
            code: '123'
            title: Other Expenses
            type: Section
            total: 1000
            records:
              - id: '123'
                code: '123'
                title: Unrealized Gain/Loss
                type: Record
                total: 1000
        uncategorized_accounts:
          x-apideck-weights:
            id: medium
            code: medium
            title: high
            type: medium
            total: critical
            records: critical
          type: object
          title: Uncategorized Accounts
          description: The accounts not categorized in the other sections
          required:
            - total
            - records
          properties:
            id:
              $ref: '#/components/schemas/Id'
            code:
              $ref: '#/components/schemas/AccountCode'
            title:
              $ref: '#/components/schemas/AccountName'
            type:
              $ref: '#/components/schemas/ProfitAndLossType'
            total:
              $ref: '#/components/schemas/TotalPLAmount'
            records:
              $ref: '#/components/schemas/ProfitAndLossRecords'
          example:
            id: '123'
            code: '123'
            title: Uncategorized Accounts
            type: Section
            total: 0
            records:
              - id: '123'
                code: '123'
                title: Elimination Adjustments
                type: Record
                total: 0
        gross_profit:
          $ref: '#/components/schemas/ProfitAndLossIndicator'
        net_operating_income:
          $ref: '#/components/schemas/ProfitAndLossIndicator'
        net_income:
          $ref: '#/components/schemas/ProfitAndLossIndicator'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        customer:
          type: string
          description: The customer id
          title: Customer
          example: '123'
    ProfitAndLossFilter:
      type: object
      x-apideck-schema-id: ProfitAndLossFilter
      example:
        customer_id: 123abc
        start_date: '2021-01-01'
        end_date: '2021-12-31'
        location_id: '123'
        accounting_method: accrual
      properties:
        customer_id:
          type: string
          title: Customer Id
          description: Filter by customer id
          example: 123abc
        start_date:
          type: string
          title: Start date
          description: Filter by start date. If start date is given, end date is required.
          example: '2021-01-01'
        end_date:
          type: string
          title: End date
          description: Filter by end date. If end date is given, start date is required.
          example: '2021-12-31'
        location_id:
          type: string
          title: Location ID
          description: Filter by location id
          example: '123'
        accounting_method:
          x-apideck-enum-id: profit-and-loss.accounting-method
          type: string
          title: Accounting Method
          description: 'The accounting method used for the report: cash or accrual.'
          example: accrual
          enum:
            - cash
            - accrual
      additionalProperties: false
    ProfitAndLossRecord:
      type: object
      x-apideck-schema-id: ProfitAndLossRecord
      x-apideck-weights:
        id: high
        code: high
        title: high
        type: high
        total: critical
      required:
        - total
      properties:
        id:
          $ref: '#/components/schemas/Id'
        code:
          $ref: '#/components/schemas/AccountCode'
        title:
          $ref: '#/components/schemas/AccountName'
        type:
          $ref: '#/components/schemas/ProfitAndLossType'
        value:
          type: number
          example: 23992.34
          deprecated: true
        total:
          $ref: '#/components/schemas/TotalAmount'
      example:
        id: '123'
        code: '123'
        title: Product Sales
        type: Record
        total: 60000
    ProfitAndLossRecords:
      type: array
      x-apideck-schema-id: ProfitAndLossRecords
      title: ProfitAndLossRecords
      x-speakeasy-type-override: any
      nullable: true
      items:
        anyOf:
          - $ref: '#/components/schemas/ProfitAndLossSection'
          - $ref: '#/components/schemas/ProfitAndLossRecord'
    ProfitAndLossSection:
      type: object
      x-apideck-schema-id: ProfitAndLossSection
      x-apideck-weights:
        id: medium
        code: medium
        title: high
        type: medium
        total: critical
        records: critical
      required:
        - total
      properties:
        id:
          $ref: '#/components/schemas/Id'
        code:
          $ref: '#/components/schemas/AccountCode'
        title:
          $ref: '#/components/schemas/AccountName'
        type:
          $ref: '#/components/schemas/ProfitAndLossType'
        total:
          $ref: '#/components/schemas/TotalPLAmount'
        records:
          $ref: '#/components/schemas/ProfitAndLossRecords'
      example:
        id: '123'
        code: '123'
        title: Operating Income
        type: Section
        total: 60000
        records:
          - id: '123'
            code: '123'
            title: Product Sales
            type: Record
            total: 200000
    PurchaseOrder:
      type: object
      x-apideck-schema-id: PurchaseOrder
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: low
        display_id: low
        po_number: low
        reference: low
        supplier: high
        company_id: middle
        location_id: low
        department_id: low
        subsidiary_id: middle
        status: critical
        issued_date: edge-case
        delivery_date: medium
        expected_arrival_date: medium
        currency: medium
        currency_rate: low
        sub_total: high
        total_tax: high
        total: critical
        tax_inclusive: low
        line_items: critical
        shipping_address: medium
        billing_address: low
        ledger_account: edge-case
        template_id: low
        discount_percentage: low
        bank_account: low
        accounting_by_row: edge-case
        due_date: low
        payment_method: low
        terms: low
        terms_id: edge-case
        amortization_type: edge-case
        tax_code: medium
        tax_method: edge-case
        issued_method: edge-case
        issued_email: edge-case
        channel: low
        memo: low
        notes: low
        custom_fields: medium
        tracking_categories: low
        row_version: edge-case
        updated_by: low
        created_by: low
        created_at: high
        updated_at: high
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          type: string
          title: Display ID
          description: Display ID of the purchase order
          example: '12345'
          nullable: true
        po_number:
          type: string
          title: Purchase Order number
          description: A PO Number uniquely identifies a purchase order and is generally defined by the buyer.
          example: '90000117'
          nullable: true
        reference:
          type: string
          title: Purchase order reference
          description: Optional purchase order reference.
          example: '123456'
          nullable: true
        supplier:
          $ref: '#/components/schemas/LinkedSupplier'
        subsidiary_id:
          $ref: '#/components/schemas/SubsidiaryId'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        location_id:
          $ref: '#/components/schemas/LocationId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        status:
          type: string
          title: Purchase order status
          example: open
          x-apideck-enum-id: purchase-orders.status
          enum:
            - draft
            - open
            - closed
            - deleted
            - billed
            - other
          nullable: true
        issued_date:
          type: string
          title: Posted date
          description: Date purchase order was issued - YYYY-MM-DD.
          format: date
          example: '2020-09-30'
          nullable: true
        delivery_date:
          type: string
          title: Delivery date
          description: The date on which the purchase order is to be delivered - YYYY-MM-DD.
          format: date
          example: '2020-09-30'
          nullable: true
        expected_arrival_date:
          type: string
          title: Expected arrival date
          description: The date on which the order is expected to arrive - YYYY-MM-DD.
          format: date
          example: '2020-09-30'
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        sub_total:
          title: Sub-total amount
          description: Sub-total amount, normally before tax.
          type: number
          example: 27500
          nullable: true
        total_tax:
          type: number
          title: Total tax amount
          description: Total tax amount applied to this invoice.
          example: 2500
          nullable: true
        total:
          type: number
          title: Total amount
          description: Total amount of invoice, including tax.
          example: 27500
          nullable: true
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
        billing_address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        template_id:
          type: string
          title: Template
          description: Optional purchase order template
          example: '123456'
          nullable: true
        discount_percentage:
          $ref: '#/components/schemas/DiscountPercentage'
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        accounting_by_row:
          $ref: '#/components/schemas/AccountingByRow'
        due_date:
          $ref: '#/components/schemas/DueDate'
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        terms:
          type: string
          title: Terms
          description: Terms of payment.
          example: Net 30 days
          nullable: true
        terms_id:
          $ref: '#/components/schemas/TermsId'
        amortization_type:
          type: string
          title: Amortization Type
          description: Type of amortization
          x-apideck-enum-id: purchase-orders.amortization-type
          enum:
            - manual
            - receipt
            - schedule
            - other
          nullable: true
        tax_code:
          $ref: '#/components/schemas/TaxCode'
        tax_method:
          type: string
          title: Tax method
          description: Method of tax calculation
          example: Due to supplier
          nullable: true
        issued_method:
          type: string
          title: Issued method
          description: Method of issuance of the purchase order
          example: Email
          nullable: true
        issued_email:
          type: string
          title: Issued email
          description: Email address of the person who issued the purchase order
          example: john.doe@example.com
          nullable: true
        channel:
          $ref: '#/components/schemas/Channel'
        memo:
          type: string
          title: Memo
          description: Message for the supplier. This text appears on the Purchase Order.
          example: Thank you for the partnership and have a great day!
          nullable: true
        notes:
          type: string
          title: Notes
          description: Internal notes for the purchase order.
          example: This is a test purchase order
          nullable: true
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    PurchaseOrdersFilter:
      type: object
      x-apideck-schema-id: PurchaseOrdersFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        supplier_id: '1234'
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        supplier_id:
          type: string
          title: Supplier ID
          example: '1234'
      additionalProperties: false
    PurchaseOrdersSort:
      type: object
      x-apideck-schema-id: PurchaseOrdersSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: purchase_orders.sort_by
          description: The field on which to sort the Purchase Orders
          enum:
            - updated_at
            - created_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    Refund:
      type: object
      x-apideck-schema-id: Refund
      x-apideck-weights:
        id: critical
        number: medium
        customer: critical
        company_id: medium
        currency: critical
        currency_rate: edge-case
        tax_inclusive: low
        sub_total: edge-case
        total_amount: critical
        total_tax: edge-case
        refund_date: critical
        status: high
        type: high
        payment_method: high
        payment_method_reference: medium
        payment_method_id: edge-case
        account: critical
        line_items: medium
        allocations: high
        note: low
        reference: medium
        billing_address: edge-case
        shipping_address: edge-case
        department: low
        location: low
        tracking_categories: low
        tax_code: low
        discount_percentage: edge-case
        discount_amount: edge-case
        customer_memo: edge-case
        custom_fields: medium
        row_version: edge-case
        updated_by: edge-case
        created_by: edge-case
        created_at: medium
        updated_at: medium
      required:
        - id
        - total_amount
      x-apideck-strict-required:
        - total_amount
        - customer
      additionalProperties: false
      properties:
        id:
          type: string
          title: Refund ID
          description: Unique identifier representing the refund
          example: '123456'
          readOnly: true
        number:
          type: string
          title: Refund number
          description: Reference number for the refund.
          example: RF-00001
          nullable: true
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        sub_total:
          $ref: '#/components/schemas/SubTotal'
        total_amount:
          $ref: '#/components/schemas/TotalAmount'
        total_tax:
          $ref: '#/components/schemas/TotalTax'
        refund_date:
          type: string
          title: Refund Date
          description: The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD
          format: date-time
          example: '2021-05-01T12:00:00.000Z'
          nullable: true
        status:
          $ref: '#/components/schemas/RefundStatus'
        type:
          $ref: '#/components/schemas/RefundType'
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_reference:
          $ref: '#/components/schemas/PaymentMethodReference'
        payment_method_id:
          $ref: '#/components/schemas/WritableId'
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        line_items:
          type: array
          description: 'Line items for itemized refunds (type: refund_receipt). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund.'
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
        allocations:
          type: array
          description: Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books.
          items:
            $ref: '#/components/schemas/Allocation'
        tax_code:
          type: string
          title: Tax Code
          description: Applicable tax id/code override if tax is not supplied on a line item basis.
          example: '1234'
          nullable: true
        discount_percentage:
          type: number
          title: Discount Percent
          description: Discount percentage applied to this refund.
          example: 5.5
          nullable: true
        discount_amount:
          type: number
          title: Discount Amount
          description: Discount amount applied to this refund.
          example: 25
          nullable: true
        note:
          type: string
          title: Note
          description: Optional note to be associated with the refund.
          example: Refund for returned items
          nullable: true
        customer_memo:
          type: string
          title: Customer memo
          description: Customer memo
          example: Thank you for your business and have a great day!
          nullable: true
        reference:
          type: string
          title: Reference
          description: Optional reference message for the refund.
          example: REF-123456
          nullable: true
        billing_address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
        department:
          $ref: '#/components/schemas/LinkedDepartment'
        location:
          $ref: '#/components/schemas/LinkedLocation'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    RefundsFilter:
      type: object
      x-apideck-schema-id: RefundsFilter
      x-graphql-type-name: RefundsFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        customer_id: 123abc
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        customer_id:
          type: string
          title: Customer ID
          description: Filter by customer id
          example: 123abc
      additionalProperties: false
    RefundsSort:
      type: object
      x-apideck-schema-id: RefundsSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: refunds.sort_by
          description: The field on which to sort the Refunds
          enum:
            - updated_at
            - created_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    RefundStatus:
      type: string
      title: Refund status
      description: 'Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state.'
      x-apideck-enum-id: refunds.status
      enum:
        - draft
        - authorised
        - posted
        - paid
        - voided
        - deleted
      example: paid
    RefundType:
      type: string
      title: Refund Type
      description: Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books).
      x-apideck-enum-id: refunds.type
      enum:
        - refund_receipt
        - cash_refund
        - credit_note_refund
      example: refund_receipt
    GetRefundResponse:
      type: object
      x-apideck-schema-id: GetRefundResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: refunds
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Refund'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetRefundsResponse:
      type: object
      x-apideck-schema-id: GetRefundsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: refunds
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Refund'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateRefundResponse:
      type: object
      x-apideck-schema-id: CreateRefundResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: refunds
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateRefundResponse:
      type: object
      x-apideck-schema-id: UpdateRefundResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: refunds
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteRefundResponse:
      type: object
      x-apideck-schema-id: DeleteRefundResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: refunds
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    Quantity:
      type: number
      title: Quantity
      example: 1
      nullable: true
    RowVersion:
      type: string
      title: Row version
      description: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
      example: 1-12345
      nullable: true
    SalesTaxNumber:
      type: string
      title: Sales Tax Number
      example: 111.222.333
      nullable: true
    SocialLink:
      type: object
      x-apideck-schema-id: SocialLink
      required:
        - url
      additionalProperties: false
      x-apideck-weights:
        id: edge-case
        url: critical
        type: critical
      properties:
        id:
          description: Unique identifier of the social link
          type: string
          example: '12345'
          nullable: true
        url:
          description: URL of the social link, e.g. https://www.twitter.com/apideck
          type: string
          example: https://www.twitter.com/apideck
          minLength: 1
        type:
          description: Type of the social link, e.g. twitter
          type: string
          example: twitter
          nullable: true
    SortDirection:
      type: string
      x-apideck-schema-id: SortDirection
      description: The direction in which to sort the results
      x-apideck-enum-id: sort_direction
      enum:
        - asc
        - desc
      default: asc
    Subsidiary:
      type: object
      x-apideck-schema-id: Subsidiary
      x-apideck-weights:
        id: medium
        name: critical
        status: critical
        display_id: low
        downstream_id: low
        address: medium
        parent_id: medium
        currencies: medium
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        parent_id:
          $ref: '#/components/schemas/WritableId'
        name:
          $ref: '#/components/schemas/CompanyName'
        display_id:
          type: string
          title: Display ID
          description: Display ID of the subsidiary
          example: '12345'
          nullable: true
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        status:
          type: string
          title: Subsidiary status
          description: Based on the status some functionality is enabled or disabled.
          x-apideck-enum-id: subsidiary.status
          enum:
            - active
            - inactive
          example: active
        address:
          $ref: '#/components/schemas/Address'
        currencies:
          type: array
          title: Currencies
          description: List of currencies supported by this subsidiary
          items:
            $ref: '#/components/schemas/Currency'
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    SubsidiaryReference:
      type: object
      x-apideck-schema-id: SubsidiaryReference
      x-apideck-weights:
        id: critical
        name: low
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        name:
          $ref: '#/components/schemas/CompanyName'
    Suffix:
      type: string
      title: Suffix
      example: Jr.
      nullable: true
    Supplier:
      type: object
      x-apideck-schema-id: Supplier
      x-apideck-weights:
        id: critical
        downstream_id: edge-case
        display_id: edge-case
        display_name: edge-case
        company_name: high
        company_id: middle
        supplier_category: edge-case
        title: high
        first_name: high
        middle_name: low
        last_name: high
        suffix: low
        individual: medium
        addresses: high
        phone_numbers: high
        emails: high
        websites: medium
        bank_accounts: high
        notes: low
        tax_rate: medium
        tax_number: medium
        taxable: medium
        currency: medium
        account: medium
        status: high
        payment_method: edge-case
        terms: edge-case
        terms_id: edge-case
        channel: edge-case
        issued_method: edge-case
        issued_email: edge-case
        tax_details: edge-case
        tax_status_details: edge-case
        updated_by: edge-case
        created_by: edge-case
        custom_fields: medium
        updated_at: medium
        created_at: medium
        row_version: edge-case
        subsidiary_id: edge-case
        integration_system_id: edge-case
      additionalProperties: false
      required:
        - id
      x-apideck-strict-required:
        - emails
        - addresses
        - phone_numbers
        - status
        - updated_at
      x-apideck-strict-any-of:
        - required:
            - first_name
            - last_name
        - required:
            - company_name
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        display_id:
          type: string
          title: Display ID
          description: Display ID
          example: EMP00101
          nullable: true
        display_name:
          type: string
          title: Display Name
          description: Display name
          example: Windsurf Shop
          nullable: true
        company_name:
          $ref: '#/components/schemas/CompanyName'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        supplier_category:
          type: string
          title: Supplier Category
          description: The category/type of the supplier
          example: Insurance
          nullable: true
        title:
          $ref: '#/components/schemas/Title'
        first_name:
          $ref: '#/components/schemas/FirstName'
        middle_name:
          $ref: '#/components/schemas/MiddleName'
        last_name:
          $ref: '#/components/schemas/LastName'
        suffix:
          $ref: '#/components/schemas/Suffix'
        individual:
          type: boolean
          title: Is individual
          description: Is this an individual or business supplier
          example: true
          nullable: true
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/Email'
        websites:
          type: array
          items:
            $ref: '#/components/schemas/Website'
        bank_accounts:
          type: array
          items:
            $ref: '#/components/schemas/BankAccount'
        notes:
          type: string
          title: Notes
          description: Some notes about this supplier
          example: Some notes about this supplier
          nullable: true
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tax_number:
          $ref: '#/components/schemas/TaxNumber'
        taxable:
          $ref: '#/components/schemas/Taxable'
        currency:
          $ref: '#/components/schemas/Currency'
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        status:
          type: string
          title: Status
          description: Supplier status
          nullable: true
          example: active
          x-apideck-enum-id: suppliers.status
          enum:
            - active
            - inactive
            - archived
            - gdpr-erasure-request
            - unknown
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        terms:
          type: string
          title: Terms
          description: Terms of payment.
          example: Net 30 days
          nullable: true
        terms_id:
          $ref: '#/components/schemas/TermsId'
        channel:
          $ref: '#/components/schemas/Channel'
        issued_method:
          type: string
          title: Issued method
          description: Method of issuance of the purchase order for the supplier
          example: Email
          nullable: true
        issued_email:
          type: string
          title: Issued email
          description: Email address of the person who issued the purchase order for the supplier
          example: john.doe@example.com
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        tax_details:
          type: array
          items:
            $ref: '#/components/schemas/LinkedTaxDetail'
        tax_status_details:
          type: array
          items:
            $ref: '#/components/schemas/LinkedTaxStatusDetail'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
        subsidiary_id:
          type: string
          title: Subsidiary ID
          description: The subsidiary the supplier belongs to.
          example: '12345'
        integration_system_id:
          type: string
          title: Integration System ID
          description: The integration system the supplier belongs to.
          example: '12345'
    SuppliersFilter:
      type: object
      x-apideck-schema-id: SuppliersFilter
      example:
        company_name: SpaceX
        display_name: Elon Musk
        first_name: Elon
        last_name: Musk
        email: elon@musk.com
        updated_since: '2020-09-30T07:43:32.000Z'
      properties:
        company_name:
          type: string
          title: Company Name
          description: Company Name of supplier to search for
          example: SpaceX
        display_name:
          type: string
          title: Display Name
          description: Display Name of supplier to search for
          example: Techno King
        first_name:
          type: string
          title: First Name
          description: First name of supplier to search for
          example: Elon
        last_name:
          type: string
          title: Last Name
          description: Last name of supplier to search for
          example: Musk
        email:
          type: string
          title: Email
          description: Email of supplier to search for
          example: elon@spacex.com
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
      additionalProperties: false
    SuppliersSort:
      type: object
      x-apideck-schema-id: SuppliersSort
      example:
        by: updated_at
        direction: desc
      properties:
        by:
          type: string
          x-apideck-enum-id: suppliers.sort_by
          description: The field on which to sort the Suppliers
          enum:
            - created_at
            - updated_at
          example: updated_at
        direction:
          $ref: '#/components/schemas/SortDirection'
      additionalProperties: false
    Tags:
      type: array
      x-apideck-schema-id: Tags
      items:
        type: string
      example:
        - New
      nullable: true
    CustomMappings:
      type: object
      x-apideck-schema-id: CustomMappings
      description: When custom mappings are configured on the resource, the result is included here.
      nullable: true
      readOnly: true
      additionalProperties: true
    TaxCode:
      type: string
      title: Tax Code
      description: Applicable tax id/code override if tax is not supplied on a line item basis.
      example: '1234'
      nullable: true
    TaxInclusive:
      type: boolean
      title: Tax inclusive
      description: Amounts are including tax
      example: true
      nullable: true
    TermsId:
      type: string
      title: Payment Terms ID
      description: The ID of the payment terms
      example: '12345'
      nullable: true
      readOnly: false
    TaxNumber:
      type: string
      title: Tax number
      example: US123945459
      nullable: true
    Taxable:
      type: boolean
      title: Taxable
      description: Whether the entity is subject to taxation
      example: true
      nullable: true
    SubTotal:
      title: Subtotal amount
      description: Subtotal amount, normally before tax.
      type: number
      example: 250
      nullable: true
    TotalTax:
      title: Total tax amount
      description: Total tax amount applied to this transaction.
      type: number
      example: 25
      nullable: true
    TaxAmount:
      title: Tax amount
      description: Tax amount
      type: number
      example: 27.5
      nullable: true
    TaxRate:
      type: object
      x-apideck-schema-id: TaxRate
      x-apideck-weights:
        id: critical
        display_id: low
        name: high
        code: edge-case
        description: low
        effective_tax_rate: critical
        total_tax_rate: high
        tax_payable_account_id: high
        tax_remitted_account_id: medium
        components: medium
        type: high
        report_tax_type: edge-case
        original_tax_rate_id: edge-case
        status: high
        country: medium
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: low
        row_version: edge-case
        subsidiaries: edge-case
      additionalProperties: false
      x-apideck-strict-required:
        - effective_tax_rate
      x-apideck-strict-any-of:
        - required:
            - id
        - required:
            - name
        - required:
            - code
      properties:
        id:
          type: string
          description: ID assigned to identify this tax rate.
          example: '1234'
          nullable: true
        display_id:
          type: string
          title: Display ID
          description: Display ID of the tax rate
          example: '12345'
          nullable: true
        name:
          type: string
          title: Name
          description: Name assigned to identify this tax rate.
          example: GST on Purchases
          minLength: 1
        code:
          type: string
          example: ABN
          title: Tax code
          description: Tax code assigned to identify this tax rate.
          nullable: true
        description:
          type: string
          title: Description
          description: Description of tax rate
          example: Reduced rate GST Purchases
          nullable: true
        effective_tax_rate:
          type: number
          title: Effective tax rate
          description: Effective tax rate
          example: 10
          nullable: true
        country:
          type: string
          title: Country
          description: Country code according to ISO 3166-1 alpha-2.
          example: US
          nullable: true
        total_tax_rate:
          type: number
          title: Total tax rate
          description: Not compounded sum of the components of a tax rate
          example: 10
          nullable: true
        tax_payable_account_id:
          type: string
          title: Tax payable account id
          description: Unique identifier for the account for tax collected.
          example: '123456'
          nullable: true
        tax_remitted_account_id:
          type: string
          title: Tax remitted account id
          description: Unique identifier for the account for tax remitted.
          example: '123456'
          nullable: true
        components:
          type: array
          title: Tax components
          items:
            x-apideck-weights:
              id: medium
              name: medium
              rate: medium
              compound: medium
            properties:
              id:
                type: string
                title: TaxRate Id
                example: '10'
                nullable: true
              name:
                type: string
                example: GST
                minLength: 1
              rate:
                type: number
                title: TaxRate
                example: 10
                nullable: true
              compound:
                type: boolean
                title: Compound
                example: true
                nullable: true
          nullable: true
        type:
          type: string
          title: Tax Type
          description: Tax type used to indicate the source of tax collected or paid
          example: NONE
          nullable: true
        report_tax_type:
          type: string
          title: Report Tax Type
          description: Report Tax type to aggregate tax collected or paid for reporting purposes
          example: NONE
          nullable: true
        original_tax_rate_id:
          type: string
          title: Original tax rate ID
          description: ID of the original tax rate from which the new tax rate is derived. Helps to understand the relationship between corresponding tax rate entities.
          example: '12345'
          nullable: true
        status:
          type: string
          x-apideck-enum-id: tax-rates.status
          enum:
            - active
            - inactive
            - archived
          title: Tax rate status
          description: Tax rate status
          example: active
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
        subsidiaries:
          type: array
          title: Subsidiaries
          description: The subsidiaries this belongs to.
          items:
            properties:
              id:
                type: string
                title: Subsidiary ID
                description: The ID of the subsidiary.
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
    TaxRatesFilter:
      type: object
      x-apideck-schema-id: TaxRatesFilter
      example:
        assets: true
        equity: true
        expenses: true
        liabilities: true
        revenue: true
        status: active
      properties:
        assets:
          type: boolean
          title: Assets
          description: Boolean to describe if tax rate can be used for asset accounts
          example: true
        equity:
          type: boolean
          title: Equity
          description: Boolean to describe if tax rate can be used for equity accounts
          example: true
        expenses:
          type: boolean
          title: Expenses
          description: Boolean to describe if tax rate can be used for expense accounts
          example: true
        liabilities:
          type: boolean
          title: Liabilities
          description: Boolean to describe if tax rate can be used for liability accounts
          example: true
        revenue:
          type: boolean
          title: Revenue
          description: Boolean to describe if tax rate can be used for revenue accounts
          example: true
        status:
          type: string
          title: Status
          description: Filter by tax rate status
          x-apideck-enum-id: tax-rates.status
          enum:
            - active
            - inactive
            - archived
          example: active
      additionalProperties: false
    Title:
      type: string
      title: Job title
      description: The job title of the person.
      example: CEO
      nullable: true
    TooManyRequestsResponse:
      type: object
      x-apideck-schema-id: TooManyRequests
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 429
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 6585)
          example: Too Many Requests
        type_name:
          type: string
          description: The type of error returned
          example: ConnectorRateLimitError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Connector Rate Limit Error
          x-speakeasy-error-message: true
        detail:
          type: object
          properties:
            context:
              type: string
            error:
              type: object
              x-speakeasy-detail: true
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#connectorratelimiterror
    UnauthorizedResponse:
      type: object
      x-apideck-schema-id: Unauthorized
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 401
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Unauthorized
        type_name:
          type: string
          description: The type of error returned
          example: UnauthorizedError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Unauthorized Request
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Missing authentication
            - type: object
              x-speakeasy-detail: true
              properties:
                type:
                  type: string
                  description: Error type identifier
                  example: refresh_token_connector_error
                message:
                  type: string
                  description: Detailed error message
                  example: Token refresh failed
                debug:
                  type: object
                  description: Debug information including request/response details and OAuth timing metadata
                  properties:
                    request:
                      type: object
                      description: HTTP request details
                    response:
                      type: object
                      description: HTTP response details
                    message:
                      type: string
                      description: Error message from downstream provider or network layer
                    code:
                      type: string
                      description: Error code (e.g., ETIMEDOUT, ECONNREFUSED)
                    credentials_expire_at_ms:
                      type: number
                      description: Unix timestamp (milliseconds) when credentials will be deleted if not refreshed. Only present for non-recoverable errors (401, 400). Credentials are preserved indefinitely for recoverable/network errors.
                      example: 1620172800000
                    retry_after_ms:
                      type: number
                      description: Unix timestamp (milliseconds) when token refresh retry is allowed after cooldown period expires.
                      example: 1620000030000
                    cooldown_remaining_ms:
                      type: number
                      description: Milliseconds remaining in cooldown period before retry is allowed.
                      example: 30000
              example:
                type: refresh_token_connector_error
                message: Token refresh failed with 401 error
                debug:
                  response:
                    statusCode: 401
                    data:
                      error: invalid_grant
                  credentials_expire_at_ms: 1620172800000
                  retry_after_ms: 1620000030000
                  cooldown_remaining_ms: 30000
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#unauthorizederror
    UnexpectedErrorResponse:
      type: object
      x-apideck-schema-id: Error
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 400
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Bad Request
        type_name:
          type: string
          description: The type of error returned
          example: RequestHeadersValidationError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Invalid Params
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: 'Missing Header: x-apideck-consumer-id'
            - type: object
              x-speakeasy-detail: true
              example:
                missing:
                  - x-apideck-consumer-id: required
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#unauthorizederror
    UnifiedId:
      title: UnifiedId
      type: object
      x-apideck-schema-id: Id
      description: A object containing a unique identifier for the resource that was created, updated, or deleted.
      required:
        - id
      properties:
        id:
          title: Id
          description: The unique identifier of the resource
          type: string
          readOnly: true
          example: '12345'
    UnitOfMeasure:
      type: string
      title: Unit of measure
      description: 'Description of the unit type the item is sold as, ie: kg, hour.'
      example: pc.
      nullable: true
    UnitPrice:
      type: number
      title: Unit price
      example: 27500.5
      nullable: true
    UnprocessableResponse:
      type: object
      x-apideck-schema-id: Unprocessable
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 422
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Unprocessable Entity
        type_name:
          type: string
          description: The type of error returned
          example: InvalidStateError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Invalid State
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Unprocessable request, please verify your request headers and body.
            - type: object
              x-speakeasy-detail: true
              example:
                error: Unprocessable
                message: Unprocessable request, please verify your request headers and body.
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#invalidstateerror
    UpdateBankAccountResponse:
      type: object
      x-apideck-schema-id: UpdateBankAccountResponse
      additionalProperties: false
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-accounts
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
    UpdateBillResponse:
      type: object
      x-apideck-schema-id: UpdateBillResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: bills
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateCreditNoteResponse:
      type: object
      x-apideck-schema-id: UpdateCreditNoteResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: credit-notes
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateCustomerResponse:
      type: object
      x-apideck-schema-id: UpdateCustomerResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: customers
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateInvoiceItemsResponse:
      type: object
      x-apideck-schema-id: UpdateInvoiceItemsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoice-items
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateInvoiceResponse:
      type: object
      x-apideck-schema-id: UpdateInvoiceResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: invoices
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/InvoiceResponse'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateJournalEntryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: journal-entries
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateLedgerAccountResponse:
      type: object
      x-apideck-schema-id: UpdateLedgerAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: ledger-accounts
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdatePaymentResponse:
      type: object
      x-apideck-schema-id: UpdatePaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdatePurchaseOrderResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: PurchaseOrders
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateSubsidiaryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: subsidiaries
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateSupplierResponse:
      type: object
      x-apideck-schema-id: UpdateSupplierResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: suppliers
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateTaxRateResponse:
      type: object
      x-apideck-schema-id: UpdateTaxRateResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: tax-rates
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdatedAt:
      type: string
      title: Updated at (timestamp)
      description: The date and time when the object was last updated.
      format: date-time
      example: '2020-09-30T07:43:32.000Z'
      readOnly: true
      nullable: true
    UpdatedBy:
      type: string
      title: Updated by
      description: The user who last updated the object.
      example: '12345'
      readOnly: true
      nullable: true
    Website:
      type: object
      x-apideck-schema-id: Website
      required:
        - url
      additionalProperties: false
      x-apideck-weights:
        url: critical
        type: critical
        id: edge-case
      properties:
        id:
          description: Unique identifier for the website
          type: string
          example: '12345'
          nullable: true
        url:
          description: The website URL
          type: string
          example: http://example.com
          minLength: 1
        type:
          description: The type of website
          type: string
          x-apideck-enum-id: websites.type
          enum:
            - primary
            - secondary
            - work
            - personal
            - other
          example: primary
          nullable: true
    WritableId:
      type: string
      title: ID
      description: A unique identifier for an object.
      example: '12345'
      readOnly: false
      nullable: true
    Attachment:
      type: object
      x-apideck-schema-id: Attachment
      x-apideck-weights:
        id: critical
        display_id: edge-case
        name: critical
        mime_type: medium
        size: medium
        reference: critical
        description: medium
        folder_id: edge-case
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: medium
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          type: string
          description: The display id of the file
          example: sample ID
          nullable: true
        name:
          type: string
          description: The name of the file
          example: sample.jpg
          nullable: true
        mime_type:
          type: string
          description: The MIME type of the file.
          example: image/jpeg
          nullable: true
        size:
          type: integer
          x-apideck-schema-id: AttachmentSize
          description: The size of the file in bytes
          example: 1810673
          nullable: true
        reference:
          $ref: '#/components/schemas/AttachmentReference'
        description:
          type: string
          description: Optional description of the file
          example: A sample image
          nullable: true
        parent_folder_id:
          type: string
          description: The folder id where this attachment belong to
          example: '123'
          nullable: true
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    AttachmentReference:
      type: object
      x-apideck-schema-id: AttachmentReference
      properties:
        type:
          $ref: '#/components/schemas/AttachmentReferenceType'
        id:
          $ref: '#/components/schemas/Id'
      additionalProperties: false
    AttachmentReferenceType:
      x-apideck-enum-id: attachment.reference_type
      type: string
      enum:
        - invoice
        - bill
        - expense
        - quote
    GetAttachmentsResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: PurchaseOrders
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateAttachmentRequest:
      type: object
      x-apideck-schema-id: CreateAttachmentRequest
      additionalProperties: false
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the file
          example: sample.jpg
        description:
          type: string
          description: Optional description of the file.
          example: My Personal Documents
        parent_folder_id:
          type: string
          description: The folder id where this attachment belong to
          example: '123'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    CreateAttachmentResponse:
      type: object
      x-apideck-schema-id: CreateAttachmentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: google-drive
        resource:
          type: string
          description: Unified API resource name
          example: files
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteAttachmentResponse:
      type: object
      x-apideck-schema-id: DeleteAttachmentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: google-drive
        resource:
          type: string
          description: Unified API resource name
          example: files
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetAttachmentResponse:
      type: object
      x-apideck-schema-id: GetAttachmentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Attachment'
        _raw:
          $ref: '#/components/schemas/Raw'
    Allocation:
      type: object
      x-apideck-schema-id: Allocation
      x-apideck-weights:
        id: medium
        type: medium
        code: medium
        amount: medium
        allocation_id: medium
      x-apideck-strict-any-of:
        - required:
            - id
        - required:
            - code
      properties:
        id:
          type: string
          title: Linked entity ID
          description: Unique identifier of entity this payment should be attributed to.
          example: '123456'
        type:
          type: string
          title: Allocation type
          description: Type of entity this payment should be attributed to.
          x-apideck-enum-id: allocations.type
          enum:
            - invoice
            - order
            - expense
            - credit_memo
            - over_payment
            - pre_payment
            - journal_entry
            - other
            - bill
        code:
          type: string
          example: N091
          readOnly: true
        amount:
          type: number
          title: Amount
          description: Amount of payment that should be attributed to this allocation. If null, the total_amount will be used.
          example: 49.99
          nullable: true
        allocation_id:
          type: string
          title: Allocation ID
          description: Unique identifier of the allocation
          example: '123456'
    TrackingCategory:
      type: object
      x-apideck-schema-id: TrackingCategory
      x-apideck-weights:
        id: medium
        parent_id: low
        parent_name: low
        name: critical
        status: critical
        code: low
        subsidiaries: edge-case
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        parent_id:
          $ref: '#/components/schemas/WritableId'
        parent_name:
          type: string
          description: The name of the parent tracking category.
          example: Area
          nullable: true
        name:
          type: string
          description: The name of the tracking category.
          example: Department
          nullable: false
        code:
          type: string
          description: The code of the tracking category.
          example: '100'
          nullable: true
        status:
          type: string
          title: Tracking Category status
          description: Based on the status some functionality is enabled or disabled.
          x-apideck-enum-id: tracking_categories.status
          enum:
            - active
            - inactive
          example: active
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
        subsidiaries:
          type: array
          title: Subsidiaries
          description: The subsidiaries the account belongs to.
          items:
            properties:
              id:
                type: string
                title: Subsidiary ID
                description: The ID of the subsidiary.
    GetTrackingCategoryResponse:
      type: object
      x-apideck-schema-id: GetTrackingCategoryResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: tracking-categories
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/TrackingCategory'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetTrackingCategoriesResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: tracking-categories
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/TrackingCategory'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateTrackingCategoryResponse:
      type: object
      x-apideck-schema-id: CreateTrackingCategoryResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: tracking-categories
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateTrackingCategoryResponse:
      type: object
      x-apideck-schema-id: UpdateTrackingCategoryResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: tracking-categories
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteTrackingCategoryResponse:
      type: object
      x-apideck-schema-id: DeleteTrackingCategoryResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: tracking-categories
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    LinkedTrackingCategories:
      type: array
      x-apideck-schema-id: LinkedTrackingCategories
      title: Linked tracking categories
      description: A list of linked tracking categories.
      nullable: true
      items:
        $ref: '#/components/schemas/LinkedTrackingCategory'
    LinkedPaymentAllocations:
      type: array
      x-apideck-schema-id: LinkedPaymentAllocations
      title: Linked payment allocations
      description: A list of linked payment allocations.
      nullable: true
      items:
        type: object
        x-apideck-weights:
          id: critical
          allocated_amount: high
          date: high
        nullable: true
        properties:
          id:
            type: string
            example: '123456'
            title: ID
            description: ID of the payment
            nullable: false
          allocated_amount:
            type: number
            example: 1000
            title: Amount
            description: Amount of the payment allocated to the bill
            nullable: true
          date:
            type: string
            format: date-time
            title: Date
            description: Date of the payment
            example: '2020-09-30T07:43:32.000Z'
            nullable: true
    LineNumber:
      title: Line number
      type: integer
      description: Line number of the resource
      example: 1
      nullable: true
    LineItemType:
      type: string
      title: Type
      description: Line Item type
      example: expense_account
      enum:
        - expense_item
        - expense_account
        - other
      x-apideck-enum-id: line_items.type
      nullable: true
    AccountingPeriod:
      type: string
      title: Accounting period
      description: Accounting period
      example: 01-24
      nullable: true
    TotalAmount:
      title: Total Amount
      description: The total amount of the transaction or record
      type: number
      example: 49.99
      nullable: true
    TransactionReference:
      title: Transaction Reference
      description: 'Optional transaction reference message ie: Debit remittance detail.'
      type: string
      example: '123456'
      nullable: true
    PaymentMethodReference:
      type: string
      title: Payment method reference
      description: Optional reference message returned by payment method on processing
      nullable: true
      example: '123456'
    TransactionDate:
      title: Transaction Date
      description: The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD
      type: string
      format: date-time
      example: '2021-05-01T12:00:00.000Z'
      nullable: true
    DeprecatedLinkedSupplier:
      type: object
      x-apideck-schema-id: DeprecatedLinkedSupplier
      title: Linked Supplier
      description: The supplier this entity is linked to.
      x-apideck-weights:
        id: medium
        display_id: medium
        display_name: high
        company_name: edge-case
        address: low
      nullable: true
      deprecated: true
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          type: string
          title: Display ID
          description: The display ID of the supplier.
          example: SUPP00101
          nullable: true
          readOnly: true
        display_name:
          type: string
          title: Display Name
          description: The display name of the supplier.
          example: Windsurf Shop
          nullable: true
        company_name:
          type: string
          title: Company Name
          description: The company name of the supplier.
          example: The boring company
          nullable: true
          readOnly: true
        address:
          $ref: '#/components/schemas/Address'
    IsReconciled:
      title: Is Reconciled
      description: Indicates if the transaction has been reconciled.
      type: boolean
      example: true
      nullable: true
    PaymentStatus:
      type: string
      title: Payment status
      description: Status of payment
      x-apideck-enum-id: payments.status
      enum:
        - draft
        - authorised
        - rejected
        - paid
        - voided
        - deleted
      example: authorised
    PaymentType:
      type: string
      title: Payment Type
      description: Type of payment
      x-apideck-enum-id: payments.type
      enum:
        - accounts_receivable
        - accounts_payable
        - accounts_receivable_credit
        - accounts_payable_credit
        - accounts_receivable_overpayment
        - accounts_payable_overpayment
        - accounts_receivable_prepayment
        - accounts_payable_prepayment
      example: accounts_receivable
    TransactionNote:
      type: string
      title: Transaction note
      description: Note associated with the transaction
      example: Some notes about this transaction
      nullable: true
    TransactionNumber:
      type: string
      title: Transaction number
      description: Number associated with the transaction
      example: '123456'
      nullable: true
    GetBillPaymentResponse:
      type: object
      x-apideck-schema-id: GetBillPaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/BillPayment'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBillPaymentsResponse:
      type: object
      x-apideck-schema-id: GetPaymentsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/BillPayment'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateBillPaymentResponse:
      type: object
      x-apideck-schema-id: CreateBillPaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateBillPaymentResponse:
      type: object
      x-apideck-schema-id: UpdateBillPaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteBillPaymentResponse:
      type: object
      x-apideck-schema-id: DeleteBillPaymentResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: payments
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    BillPayment:
      type: object
      x-apideck-schema-id: BillPayment
      x-apideck-weights:
        id: critical
        downstream_id: medium
        currency: critical
        currency_rate: medium
        total_amount: critical
        reference: medium
        payment_method: medium
        payment_method_reference: medium
        payment_method_id: edge-case
        account: critical
        transaction_date: critical
        customer: high
        supplier: high
        company_id: medium
        reconciled: low
        status: high
        type: high
        allocations: critical
        note: low
        number: medium
        tracking_categories: low
        custom_fields: medium
        row_version: edge-case
        display_id: low
        updated_by: edge-case
        created_by: edge-case
        created_at: medium
        updated_at: medium
      required:
        - id
        - total_amount
        - transaction_date
      x-apideck-strict-required:
        - total_amount
        - transaction_date
        - allocations
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        total_amount:
          $ref: '#/components/schemas/TotalAmount'
        reference:
          $ref: '#/components/schemas/TransactionReference'
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        payment_method_reference:
          $ref: '#/components/schemas/PaymentMethodReference'
        payment_method_id:
          $ref: '#/components/schemas/WritableId'
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        transaction_date:
          $ref: '#/components/schemas/TransactionDate'
        supplier:
          $ref: '#/components/schemas/LinkedSupplier'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        reconciled:
          $ref: '#/components/schemas/IsReconciled'
        status:
          $ref: '#/components/schemas/PaymentStatus'
        type:
          type: string
          title: Bill payment Type
          description: Type of payment
          x-apideck-enum-id: bill-payments.type
          enum:
            - accounts_payable_credit
            - accounts_payable_overpayment
            - accounts_payable_prepayment
            - accounts_payable
          example: accounts_payable
        allocations:
          type: array
          items:
            type: object
            x-apideck-schema-id: Allocation
            x-apideck-weights:
              id: medium
              type: medium
              code: medium
              amount: medium
              allocation_id: medium
            x-apideck-strict-any-of:
              - required:
                  - id
              - required:
                  - code
            properties:
              id:
                $ref: '#/components/schemas/WritableId'
              type:
                type: string
                title: Allocation type
                description: Type of entity this payment should be attributed to.
                example: bill
                x-apideck-enum-id: bill-payments.allocations.type
                enum:
                  - bill
                  - expense
                  - credit_memo
                  - over_payment
                  - pre_payment
                  - journal_entry
                  - other
              code:
                type: string
                example: N091
                readOnly: true
              amount:
                type: number
                title: Amount
                description: Amount of payment that should be attributed to this allocation. If null, the total_amount will be used.
                example: 49.99
                nullable: true
              allocation_id:
                type: string
                title: Allocation ID
                description: Unique identifier of the allocation
                example: '123456'
        note:
          $ref: '#/components/schemas/TransactionNote'
        number:
          $ref: '#/components/schemas/TransactionNumber'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    DisplayId:
      type: string
      title: Display id
      description: Id to be displayed.
      example: '123456'
      nullable: true
    CreateExpenseResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Expenses
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteExpenseResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Expenses
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetExpenseResponse:
      type: object
      x-apideck-schema-id: GetExpenseResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Expenses
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Expense'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetExpensesResponse:
      type: object
      x-apideck-schema-id: GetExpensesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Expenses
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Expense'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    Expense:
      type: object
      x-apideck-schema-id: Expense
      additionalProperties: false
      x-apideck-weights:
        id: critical
        display_id: high
        transaction_date: critical
        account_id: critical
        account: critical
        supplier_id: high
        supplier: high
        line_items: high
        currency: high
        type: high
        number: medium
        memo: medium
        total_amount: medium
        sub_total: high
        total_tax: high
        tax_inclusive: medium
        tracking_categories: medium
        currency_rate: edge-case
        company_id: edge-case
        location: medium
        department_id: medium
        department: medium
        payment_type: medium
        tax_rate: medium
        reference: medium
        custom_fields: medium
        source_document_url: low
        custom_mappings: low
        pass_through: low
        status: medium
        updated_at: medium
        created_at: medium
        updated_by: low
        created_by: low
        row_version: low
      required:
        - transaction_date
        - line_items
      x-apideck-strict-required:
        - transaction_date
        - line_items
      x-apideck-strict-any-of:
        - required:
            - account_id
        - required:
            - account
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        number:
          type: string
          title: Number
          description: Number.
          example: OIT00546
          nullable: true
        transaction_date:
          $ref: '#/components/schemas/TransactionDate'
        account_id:
          title: Account ID
          description: The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead.
          type: string
          example: '123456'
          deprecated: true
        account:
          $ref: '#/components/schemas/LinkedFinancialAccount'
        supplier_id:
          type: string
          title: Supplier ID
          description: The ID of the supplier this entity is linked to. Deprecated, use supplier instead.
          example: '12345'
          deprecated: true
        supplier:
          $ref: '#/components/schemas/LinkedSupplier'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        location:
          $ref: '#/components/schemas/LinkedLocation'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        department:
          $ref: '#/components/schemas/LinkedDepartment'
        payment_type:
          type: string
          title: Payment type
          description: The type of payment for the expense.
          x-apideck-enum-id: expenses.payment_type
          enum:
            - cash
            - check
            - credit_card
            - other
          example: cash
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        type:
          type: string
          title: Expense type
          description: The type of expense.
          x-apideck-enum-id: expenses.type
          enum:
            - expense
            - refund
          example: expense
          nullable: true
        memo:
          type: string
          title: Memo
          description: The memo of the expense.
          example: For travel expenses incurred on 2024-05-15
          nullable: true
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        sub_total:
          $ref: '#/components/schemas/SubTotal'
        total_tax:
          $ref: '#/components/schemas/TotalTax'
        total_amount:
          type: number
          title: Total amount
          description: The total amount of the expense line item.
          example: 275
          nullable: true
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        line_items:
          type: array
          minItems: 1
          description: Expense line items linked to this expense.
          items:
            $ref: '#/components/schemas/ExpenseLineItem'
        reference:
          $ref: '#/components/schemas/Reference'
        source_document_url:
          type: string
          title: Source document URL
          description: URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
          example: https://www.invoicesolution.com/expense/123456
          nullable: true
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        status:
          type: string
          title: Status
          description: Expense status
          example: draft
          x-apideck-enum-id: expenses.status
          enum:
            - draft
            - posted
            - voided
          nullable: true
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    ExpenseLineItem:
      type: object
      x-apideck-schema-id: ExpenseLineItem
      additionalProperties: false
      x-apideck-weights:
        id: high
        description: medium
        type: medium
        total_amount: high
        tax_amount: high
        quantity: high
        unit_price: high
        item: high
        tax_rate: medium
        tracking_categories: low
        account_id: critical
        account: critical
        customer_id: medium
        customer: medium
        department_id: edge-case
        department: edge-case
        location_id: edge-case
        location: edge-case
        line_number: edge-case
        rebilling: medium
      required:
        - total_amount
      x-apideck-strict-required:
        - total_amount
      properties:
        id:
          $ref: '#/components/schemas/Id'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        account_id:
          title: Account ID
          description: The unique identifier for the ledger account. Deprecated, use account instead.
          type: string
          example: '123456'
          deprecated: true
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        customer_id:
          type: string
          title: Customer ID
          description: The ID of the customer this expense item is linked to. Deprecated in favor of `customer`.
          example: '12345'
          deprecated: true
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        department:
          $ref: '#/components/schemas/LinkedDepartment'
        location_id:
          $ref: '#/components/schemas/LocationId'
        location:
          $ref: '#/components/schemas/LinkedLocation'
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        description:
          type: string
          title: Description
          description: The expense line item description
          example: Travel US.
          nullable: true
        type:
          $ref: '#/components/schemas/LineItemType'
        total_amount:
          type: number
          title: Total amount
          description: The total amount of the expense line item.
          example: 275
          nullable: true
        tax_amount:
          $ref: '#/components/schemas/TaxAmount'
        quantity:
          $ref: '#/components/schemas/Quantity'
        unit_price:
          $ref: '#/components/schemas/UnitPrice'
        item:
          $ref: '#/components/schemas/LinkedInvoiceItem'
        line_number:
          $ref: '#/components/schemas/LineNumber'
        rebilling:
          $ref: '#/components/schemas/Rebilling'
    ExpenseCategory:
      type: object
      x-apideck-schema-id: ExpenseCategory
      additionalProperties: false
      x-apideck-weights:
        id: critical
        display_id: medium
        name: critical
        code: medium
        description: high
        status: critical
        account: critical
        offset_account: edge-case
        tax_rate: medium
        rate_required: low
        default_rate: low
        custom_mappings: low
        downstream_id: low
        row_version: low
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: medium
        pass_through: low
      required:
        - name
      x-apideck-strict-required:
        - id
        - name
        - status
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        name:
          type: string
          title: Name
          description: The name of the expense category.
          example: Travel
        code:
          type: string
          title: Code
          description: The code or external identifier of the expense category.
          example: TRAVEL-001
          nullable: true
        description:
          type: string
          title: Description
          description: The description of the expense category.
          example: Travel-related expenses including flights, hotels, and ground transportation.
          nullable: true
        status:
          type: string
          title: Status
          description: The status of the expense category.
          x-apideck-enum-id: expense_categories.status
          enum:
            - active
            - inactive
          example: active
          nullable: true
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        offset_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        rate_required:
          type: boolean
          title: Rate Required
          description: Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile).
          example: false
          nullable: true
        default_rate:
          type: number
          title: Default Rate
          description: Default rate when rate_required is true (e.g. 0.67 for mileage).
          example: 0.67
          nullable: true
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    ExpenseCategoriesFilter:
      type: object
      x-apideck-schema-id: ExpenseCategoriesFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        status: active
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        status:
          type: string
          enum:
            - active
            - inactive
          x-apideck-enum-id: expense_categories.status
      additionalProperties: false
    GetExpenseCategoryResponse:
      type: object
      x-apideck-schema-id: GetExpenseCategoryResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseCategories
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/ExpenseCategory'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetExpenseCategoriesResponse:
      type: object
      x-apideck-schema-id: GetExpenseCategoriesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseCategories
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/ExpenseCategory'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateExpenseCategoryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseCategories
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateExpenseCategoryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseCategories
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteExpenseCategoryResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseCategories
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    ExpenseReport:
      type: object
      x-apideck-schema-id: ExpenseReport
      additionalProperties: false
      x-apideck-weights:
        id: critical
        display_id: high
        number: medium
        title: high
        employee: critical
        status: critical
        transaction_date: critical
        posting_date: low
        due_date: medium
        currency: high
        currency_rate: edge-case
        sub_total: high
        total_tax: high
        total_amount: critical
        reimbursable_amount: medium
        memo: medium
        department: medium
        location: medium
        account: medium
        accounting_period: low
        line_items: critical
        subsidiary: medium
        tracking_categories: medium
        tax_inclusive: edge-case
        approved_by: low
        custom_fields: medium
        custom_mappings: low
        row_version: low
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: medium
        pass_through: low
      required:
        - employee
        - transaction_date
        - line_items
      x-apideck-strict-required:
        - id
        - employee
        - transaction_date
        - line_items
        - status
        - total_amount
      properties:
        id:
          $ref: '#/components/schemas/Id'
        display_id:
          $ref: '#/components/schemas/DisplayId'
        number:
          type: string
          title: Number
          description: The expense report number.
          example: ER-001
          nullable: true
        title:
          type: string
          title: Title
          description: Title or purpose of the expense report.
          example: Q1 Business Travel
          nullable: true
        employee:
          type: object
          title: Employee
          description: The employee who submitted the expense report.
          properties:
            id:
              type: string
              title: Employee ID
              description: A unique identifier for the employee.
              example: '12345'
            display_name:
              type: string
              title: Employee Display Name
              description: The display name of the employee.
              example: John Doe
              nullable: true
        status:
          type: string
          title: Status
          description: The status of the expense report.
          x-apideck-enum-id: expense_reports.status
          enum:
            - draft
            - submitted
            - approved
            - reimbursed
            - rejected
            - reversed
            - voided
          example: submitted
          nullable: true
        transaction_date:
          $ref: '#/components/schemas/TransactionDate'
        posting_date:
          type: string
          title: Posting Date
          description: The date the expense report was posted to the general ledger.
          format: date
          example: '2024-06-01'
          nullable: true
        due_date:
          type: string
          title: Due Date
          description: Date when reimbursement is due.
          format: date
          example: '2024-06-15'
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        sub_total:
          $ref: '#/components/schemas/SubTotal'
        total_tax:
          $ref: '#/components/schemas/TotalTax'
        total_amount:
          type: number
          title: Total Amount
          description: Total amount of all expense lines including tax.
          example: 1250.75
          nullable: true
        reimbursable_amount:
          type: number
          title: Reimbursable Amount
          description: Total reimbursable amount (may differ from total if some expenses are non-reimbursable).
          example: 1100
          nullable: true
        memo:
          type: string
          title: Memo
          description: The memo of the expense report.
          example: Business travel expenses for Q1 client meetings
          nullable: true
        department:
          $ref: '#/components/schemas/LinkedDepartment'
        location:
          $ref: '#/components/schemas/LinkedLocation'
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        accounting_period:
          type: object
          title: Accounting Period
          description: The accounting period the expense report is posted to.
          nullable: true
          properties:
            id:
              type: string
              title: Accounting Period ID
              description: A unique identifier for the accounting period.
              example: '12345'
            name:
              type: string
              title: Accounting Period Name
              description: The name of the accounting period.
              example: Q1 2024
              nullable: true
        line_items:
          type: array
          minItems: 1
          description: Expense line items linked to this expense report.
          items:
            $ref: '#/components/schemas/ExpenseReportLineItem'
        subsidiary:
          $ref: '#/components/schemas/LinkedSubsidiary'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        approved_by:
          type: object
          title: Approved By
          description: The person who approved the expense report.
          nullable: true
          properties:
            id:
              type: string
              title: Approver ID
              description: A unique identifier for the approver.
              example: '12345'
            display_name:
              type: string
              title: Approver Display Name
              description: The display name of the approver.
              example: Jane Smith
              nullable: true
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    ExpenseReportLineItem:
      type: object
      x-apideck-schema-id: ExpenseReportLineItem
      additionalProperties: false
      x-apideck-weights:
        id: high
        line_number: medium
        expense_category: critical
        account: critical
        description: medium
        quantity: medium
        unit_price: medium
        amount: critical
        tax_rate: medium
        tax_amount: high
        total_amount: high
        transaction_date: high
        billable: medium
        reimbursable: medium
        customer: medium
        department: medium
        location: medium
        tracking_categories: low
        receipt_url: low
        currency: edge-case
        updated_by: edge-case
        created_by: edge-case
        updated_at: edge-case
        created_at: edge-case
      required:
        - amount
      x-apideck-strict-required:
        - amount
      x-apideck-strict-any-of:
        - required:
            - expense_category
        - required:
            - account
      properties:
        id:
          $ref: '#/components/schemas/Id'
        line_number:
          $ref: '#/components/schemas/LineNumber'
        expense_category:
          $ref: '#/components/schemas/LinkedExpenseCategory'
        account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        description:
          type: string
          title: Description
          description: The description of the expense line item.
          example: Flight to New York
          nullable: true
        quantity:
          $ref: '#/components/schemas/Quantity'
        unit_price:
          $ref: '#/components/schemas/UnitPrice'
        amount:
          type: number
          title: Amount
          description: The amount of the expense line item.
          example: 275
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tax_amount:
          $ref: '#/components/schemas/TaxAmount'
        total_amount:
          type: number
          title: Total Amount
          description: The total amount of the expense line item including tax.
          example: 302.5
          nullable: true
        transaction_date:
          type: string
          title: Transaction Date
          description: The date of the individual expense.
          format: date
          example: '2024-05-15'
          nullable: true
        billable:
          type: boolean
          title: Billable
          description: Whether the expense is billable to a customer.
          example: true
          nullable: true
        reimbursable:
          type: boolean
          title: Reimbursable
          description: Whether the expense is reimbursable to the employee.
          example: true
          nullable: true
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        department:
          $ref: '#/components/schemas/LinkedDepartment'
        location:
          $ref: '#/components/schemas/LinkedLocation'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        receipt_url:
          type: string
          title: Receipt URL
          description: URL to the receipt or attachment for this expense line.
          example: https://example.com/receipts/123.pdf
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
    ExpenseReportsFilter:
      type: object
      x-apideck-schema-id: ExpenseReportsFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        status: submitted
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        status:
          type: string
          enum:
            - draft
            - submitted
            - approved
            - reimbursed
            - rejected
            - reversed
            - voided
          x-apideck-enum-id: expense_reports.status
        employee_id:
          type: string
          title: Employee ID
          description: Filter by employee ID
          example: '12345'
      additionalProperties: false
    GetExpenseReportResponse:
      type: object
      x-apideck-schema-id: GetExpenseReportResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseReports
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/ExpenseReport'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetExpenseReportsResponse:
      type: object
      x-apideck-schema-id: GetExpenseReportsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseReports
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/ExpenseReport'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateExpenseReportResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseReports
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateExpenseReportResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseReports
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteExpenseReportResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: netsuite
        resource:
          type: string
          description: Unified API resource name
          example: ExpenseReports
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateExpenseResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Expenses
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    OutstandingBalanceByCustomer:
      type: object
      title: Outstanding Balance
      x-apideck-schema-id: OutstandingBalanceByCustomer
      additionalProperties: false
      x-apideck-weights:
        customer_id: high
        customer_name: high
        outstanding_balances_by_currency: critical
      properties:
        customer_id:
          type: string
          title: Customer ID
          description: Unique identifier for the customer.
          example: '123'
        customer_name:
          type: string
          title: Customer Name
          description: Full name of the customer.
          example: Super Store
        outstanding_balances_by_currency:
          type: array
          items:
            $ref: '#/components/schemas/OutstandingBalanceByCurrency'
    OutstandingBalanceBySupplier:
      type: object
      title: Outstanding Balance
      x-apideck-schema-id: OutstandingBalanceBySupplier
      additionalProperties: false
      x-apideck-weights:
        supplier_id: high
        supplier_name: high
        outstanding_balances_by_currency: critical
      properties:
        supplier_id:
          type: string
          title: Supplier ID
          description: Unique identifier for the supplier.
          example: '123'
        supplier_name:
          type: string
          title: Supplier Name
          description: Full name of the supplier.
          example: Super Store
        outstanding_balances_by_currency:
          type: array
          items:
            $ref: '#/components/schemas/OutstandingBalanceByCurrency'
    OutstandingBalanceByCurrency:
      type: object
      title: Outstanding Balance by Currency
      x-apideck-schema-id: OutstandingBalanceByCurrency
      additionalProperties: false
      x-apideck-weights:
        currency: high
        balances_by_period: critical
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        total_amount:
          type: number
          title: Total Amount
          description: Total amount of the outstanding balance.
        balances_by_period:
          type: array
          items:
            $ref: '#/components/schemas/BalanceByPeriod'
    BalanceByPeriod:
      type: object
      title: Balance by Period
      x-apideck-schema-id: BalanceByPeriod
      additionalProperties: false
      x-apideck-weights:
        start_date: high
        end_date: high
        total_amount: critical
        balances_by_transaction: high
      properties:
        start_date:
          type: string
          nullable: true
          title: Start Date
          description: The starting date of the period. If not provided, it represents the oldest period, where all transactions due before the specified `end_date` are included.
          format: date
          example: '2024-01-01'
        end_date:
          type: string
          nullable: true
          title: End Date
          description: The ending date of the period. If not provided, it represents an open-ended period starting from the `start_date`, typically capturing future-dated transactions that are not yet aged.
          format: date
          example: '2024-01-30'
        total_amount:
          type: number
          title: Total Amount
          description: Total amount of the period.
          example: 1500
        balances_by_transaction:
          type: array
          items:
            $ref: '#/components/schemas/BalanceByTransaction'
    BalanceByTransaction:
      type: object
      title: Balance by Transaction
      x-apideck-schema-id: BalanceByTransaction
      additionalProperties: false
      x-apideck-weights:
        transaction_id: critical
        transaction_date: high
        transaction_type: high
        transaction_number: medium
        due_date: high
        original_amount: high
        outstanding_balance: critical
      properties:
        transaction_id:
          type: string
          title: Transaction ID
          description: Unique identifier for the transaction.
          example: INV-1001
          nullable: false
        transaction_date:
          type: string
          format: date
          title: Transaction Date
          description: Date of the transaction.
          example: '2024-01-15'
          nullable: false
        transaction_type:
          type: string
          title: Transaction Type
          description: Type of the transaction.
          example: invoice
          x-apideck-enum-id: balances_by_transactions.transaction_type
          enum:
            - invoice
            - credit_note
            - bill
            - payment
            - bill_payment
          nullable: false
        due_date:
          type: string
          format: date
          title: Due Date
          description: Due date of the transaction.
          example: '2024-02-15'
          nullable: false
        original_amount:
          type: number
          title: Original Amount
          description: Original amount of the transaction.
          example: 1000
          nullable: false
        outstanding_balance:
          type: number
          title: Outstanding Balance
          description: Outstanding balance of the transaction.
          example: 800
          nullable: false
        transaction_number:
          type: string
          title: Transaction Number
          description: Transaction number of the transaction.
          example: INV-1001
          nullable: false
    AgedCreditors:
      type: object
      x-apideck-schema-id: AgedCreditors
      additionalProperties: false
      x-apideck-weights:
        report_generated_at: critical
        report_as_of_date: high
        period_count: medium
        period_length: medium
        outstanding_balances: critical
      properties:
        report_generated_at:
          $ref: '#/components/schemas/ReportGeneratedAt'
        report_as_of_date:
          $ref: '#/components/schemas/ReportAsOfDate'
        period_count:
          $ref: '#/components/schemas/PeriodCount'
        period_length:
          $ref: '#/components/schemas/PeriodLength'
        outstanding_balances:
          type: array
          items:
            $ref: '#/components/schemas/OutstandingBalanceBySupplier'
    AgedDebtors:
      type: object
      x-apideck-schema-id: AgedDebtors
      additionalProperties: false
      x-apideck-weights:
        report_generated_at: critical
        report_as_of_date: high
        period_count: medium
        period_length: medium
        outstanding_balances: critical
      properties:
        report_generated_at:
          $ref: '#/components/schemas/ReportGeneratedAt'
        report_as_of_date:
          $ref: '#/components/schemas/ReportAsOfDate'
        period_count:
          $ref: '#/components/schemas/PeriodCount'
        period_length:
          $ref: '#/components/schemas/PeriodLength'
        outstanding_balances:
          type: array
          items:
            $ref: '#/components/schemas/OutstandingBalanceByCustomer'
    PeriodLength:
      type: integer
      title: Period Length
      description: Length of each aging period in days.
      example: 30
      default: 30
    PeriodCount:
      type: integer
      title: Period Count
      description: Number of aging periods shown in the report.
      example: 4
      default: 4
    ReportAsOfDate:
      type: string
      title: Report As Of Date
      description: The cutoff date for transactions included in the report.
      format: date
      example: '2024-11-13'
    ReportGeneratedAt:
      type: string
      title: Report Generated At
      description: The exact date and time the report was generated.
      format: date-time
      example: '2024-11-14T12:00:00.000Z'
    GetAgedCreditorsResponse:
      type: object
      x-apideck-schema-id: GetAgedCreditorsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: AgedCreditors
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/AgedCreditors'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetAgedDebtorsResponse:
      type: object
      x-apideck-schema-id: GetAgedDebtorsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: AgedDebtors
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/AgedDebtors'
        _raw:
          $ref: '#/components/schemas/Raw'
    AgedReportFilter:
      type: object
      x-apideck-schema-id: AgedReportFilter
      example:
        supplier_id: 123abc
        customer_id: 123abc
        report_as_of_date: '2024-01-01'
        period_count: 3
        period_length: 30
      properties:
        customer_id:
          type: string
          title: Customer Id
          description: Filter by customer id
          example: 123abc
        supplier_id:
          type: string
          title: Supplier Id
          description: Filter by supplier id
          example: 123abc
        report_as_of_date:
          type: string
          title: Report As Of Date
          description: The cutoff date for considering transactions
          example: '2024-01-01'
        period_count:
          title: Period Count
          description: Number of periods to split the aged creditors report into
          example: 3
          type: integer
          minimum: 1
          maximum: 12
        period_length:
          title: Period Length
          description: Length of each period in days
          example: 30
          type: integer
          minimum: 1
          maximum: 365
      additionalProperties: false
    TotalPLAmount:
      title: Total Amount
      description: The aggregated total of all accounts within this category.
      type: number
      example: 1000
      nullable: true
    Raw:
      title: raw
      type: object
      x-apideck-schema-id: Raw
      description: Raw response from the integration when raw=true query param is provided
      nullable: true
      additionalProperties: true
    ProfitAndLossType:
      title: Profit and Loss Type
      description: The type of profit and loss
      type: string
      example: Section
      nullable: true
      x-apideck-enum-id: profit_and_loss.type
      enum:
        - Section
        - Record
    ProfitAndLossIndicator:
      type: object
      x-apideck-schema-id: ProfitAndLossIndicator
      x-apideck-weights:
        total: critical
      properties:
        total:
          $ref: '#/components/schemas/TotalAmount'
      example:
        total: 10000
    DepartmentId:
      type: string
      title: Department ID
      description: The ID of the department
      example: '12345'
      nullable: true
      readOnly: false
    LocationId:
      type: string
      title: Location ID
      description: The ID of the location
      example: '12345'
      nullable: true
      readOnly: false
    SubsidiaryId:
      type: string
      title: Subsidiary ID
      description: The ID of the subsidiary
      example: '12345'
      nullable: true
      readOnly: false
    CreditOrDebit:
      type: string
      title: Credit or Debit
      description: Whether the amount is a credit or debit.
      x-apideck-enum-id: accounting.credit_or_debit
      enum:
        - credit
        - debit
      example: debit
    BankFeedAccount:
      type: object
      x-apideck-schema-id: BankFeedAccount
      additionalProperties: false
      x-apideck-weights:
        id: critical
        bank_account_type: high
        source_account_id: high
        target_account_id: high
        target_account_name: high
        target_account_number: high
        currency: medium
        feed_status: medium
        country: medium
        created_at: low
        updated_at: low
        updated_by: low
        created_by: low
      required:
        - id
      x-apideck-strict-required:
        - bank_account_type
        - source_account_id
      properties:
        id:
          $ref: '#/components/schemas/Id'
        bank_account_type:
          type: string
          title: Bank Account Type
          description: Type of the bank account.
          x-apideck-enum-id: bank_feed_accounts.account_type
          enum:
            - bank
            - credit_card
          example: bank
        source_account_id:
          type: string
          title: Source Account ID
          description: The source account's unique identifier.
          example: src_456
        target_account_id:
          type: string
          title: Target Account ID
          description: The target account's unique identifier in the accounting connector.
          example: tgt_789
        target_account_name:
          type: string
          title: Target Account Name
          description: Name associated with the target account.
          example: Main Company Checking
        target_account_number:
          type: string
          title: Target Account Number
          description: Account number of the destination bank account.
          example: NL91ABNA0417164300
        currency:
          $ref: '#/components/schemas/Currency'
        feed_status:
          type: string
          title: Feed Status
          description: Current status of the bank feed.
          x-apideck-enum-id: bank_feeds.status
          enum:
            - pending
            - rejected
          example: pending
        country:
          $ref: '#/components/schemas/Country'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
    BankFeedStatement:
      type: object
      x-apideck-schema-id: BankFeedStatement
      additionalProperties: false
      x-apideck-weights:
        id: critical
        bank_feed_account_id: critical
        status: high
        start_date: high
        end_date: high
        start_balance: medium
        start_balance_credit_or_debit: medium
        end_balance: medium
        end_balance_credit_or_debit: medium
        transactions: critical
        created_at: low
        updated_at: low
        updated_by: low
        created_by: low
      required:
        - id
      x-apideck-strict-required:
        - bank_feed_account_id
        - status
        - start_date
        - end_date
      properties:
        id:
          $ref: '#/components/schemas/Id'
        bank_feed_account_id:
          type: string
          title: Bank Feed Account ID
          description: The ID of the bank feed account this statement belongs to.
          example: acc_456
        status:
          type: string
          title: Statement Status
          description: The current status of the bank feed statement.
          x-apideck-enum-id: bank_feed_statements.status
          enum:
            - pending
            - rejected
            - success
          example: pending
        start_date:
          type: string
          title: Start Date
          description: Start date of the bank feed statement.
          format: date-time
          example: '2021-05-01T12:00:00.000Z'
        end_date:
          type: string
          format: date-time
          title: End Date
          description: End date of the bank feed statement.
          example: '2025-01-31T12:00:00.000Z'
        start_balance:
          type: number
          title: Start Balance
          description: Balance amount at the start of the period.
          example: 10500.25
        start_balance_credit_or_debit:
          $ref: '#/components/schemas/CreditOrDebit'
        end_balance:
          type: number
          title: End Balance
          description: Balance amount at the end of the period.
          example: 9800.5
        end_balance_credit_or_debit:
          $ref: '#/components/schemas/CreditOrDebit'
        transactions:
          type: array
          title: Bank Feed Statement Transactions
          description: List of transactions in the bank feed statement.
          items:
            type: object
            properties:
              posted_date:
                type: string
                format: date-time
                title: Posted Date
                description: The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD
                example: '2025-01-15T12:00:00.000Z'
              description:
                type: string
                title: Description
                description: A description of the transaction.
                example: Payment received from ACME Corp
              amount:
                type: number
                title: Transaction Amount
                description: The amount of the transaction.
                example: 250
              credit_or_debit:
                $ref: '#/components/schemas/CreditOrDebit'
              source_transaction_id:
                type: string
                title: Source Transaction ID
                description: The ID of the source transaction.
                example: txn_987
              counterparty:
                type: string
                title: Counterparty
                description: The counterparty of the transaction.
                example: ACME Corp
              reference:
                type: string
                title: Reference
                description: The reference of the transaction.
                example: INV-2025-01
              transaction_type:
                type: string
                title: Transaction Type
                description: Type of transaction.
                x-apideck-enum-id: bank_feed_statements.transaction_type
                enum:
                  - credit
                  - debit
                  - deposit
                  - transfer
                  - payment
                  - other
                example: payment
            required:
              - posted_date
              - amount
              - credit_or_debit
              - source_transaction_id
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
    CreateBankFeedAccountResponse:
      type: object
      x-apideck-schema-id: CreateBankFeedAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: bills
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteBankFeedAccountResponse:
      type: object
      x-apideck-schema-id: DeleteBankFeedAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-accounts
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBankFeedAccountResponse:
      type: object
      x-apideck-schema-id: GetBankFeedAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-accounts
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/BankFeedAccount'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBankFeedAccountsResponse:
      type: object
      x-apideck-schema-id: GetBankFeedAccountsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-accounts
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/BankFeedAccount'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateBankFeedAccountResponse:
      type: object
      x-apideck-schema-id: UpdateBankFeedAccountResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-accounts
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateBankFeedStatementResponse:
      type: object
      x-apideck-schema-id: CreateBankFeedStatementResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: bills
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    DeleteBankFeedStatementResponse:
      type: object
      x-apideck-schema-id: DeleteBankFeedStatementResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-statements
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBankFeedStatementResponse:
      type: object
      x-apideck-schema-id: GetBankFeedStatementResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-statements
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/BankFeedStatement'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetBankFeedStatementsResponse:
      type: object
      x-apideck-schema-id: GetBankFeedStatementsResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-statements
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/BankFeedStatement'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateBankFeedStatementResponse:
      type: object
      x-apideck-schema-id: UpdateBankFeedStatementResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: bank-feed-statements
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
        _raw:
          $ref: '#/components/schemas/Raw'
    Rebilling:
      type: object
      x-apideck-schema-id: Rebilling
      title: Rebilling
      description: Rebilling metadata for this line item.
      nullable: true
      x-apideck-weights:
        rebillable: high
        rebill_status: medium
        linked_transaction_id: high
        linked_transaction_line_id: high
      properties:
        rebillable:
          type: boolean
          title: Rebillable
          description: Whether this line item is eligible for rebilling.
          example: true
        rebill_status:
          type: string
          title: Rebill Status
          x-apideck-enum-id: rebill-status
          description: Status of the rebilling process for this line item.
          enum:
            - pending
            - billed
            - voided
            - other
          example: billed
          nullable: true
        linked_transaction_id:
          type: string
          title: Linked Transaction ID
          description: The ID of the transaction this line item was rebilled to.
          example: txn_abc123
          nullable: true
        linked_transaction_line_id:
          type: string
          title: Linked Transaction Line ID
          description: The ID of the line item in the rebilled transaction.
          example: line_xyz789
          nullable: true
    Reference:
      type: string
      title: Reference
      description: Optional reference identifier for the transaction.
      example: INV-2024-001
      nullable: true
    Category:
      type: object
      x-apideck-schema-id: Category
      x-apideck-weights:
        id: medium
        display_id: low
        name: critical
        status: critical
        type: critical
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/Id'
        name:
          type: string
          description: The name of the category.
          example: Insurance
          nullable: false
        display_id:
          type: string
          title: Display ID
          description: Display ID of the category
          example: '12345'
          nullable: true
        type:
          type: string
          description: The type of the category.
          example: expense
          x-apideck-enum-id: category.type
          enum:
            - supplier
            - expense
            - revenue
            - customer
          nullable: false
        status:
          type: string
          title: Category status
          description: Based on the status some functionality is enabled or disabled.
          x-apideck-enum-id: category.status
          enum:
            - active
            - inactive
          example: active
        custom_mappings:
          $ref: '#/components/schemas/CustomMappings'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    CategoriesFilter:
      type: object
      x-apideck-schema-id: CategoriesFilter
      example:
        type: expense
      properties:
        type:
          type: string
          title: Type
          description: The type of the category.
          example: expense
          x-apideck-enum-id: category.type
          enum:
            - supplier
            - expense
            - revenue
            - customer
          nullable: false
      additionalProperties: false
    GetCategoryResponse:
      type: object
      x-apideck-schema-id: GetCategoryResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: categories
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Category'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCategoriesResponse:
      type: object
      x-apideck-schema-id: GetCategoriesResponse
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: xero
        resource:
          type: string
          description: Unified API resource name
          example: categories
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Category'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    Country:
      type: string
      example: US
      title: Country Code
      description: Country code according to ISO 3166-1 alpha-2.
      minLength: 2
      maxLength: 2
      nullable: true
    WebhookEvent:
      x-sdk-exclude: true
      allOf:
        - type: object
          x-apideck-schema-id: WebhookEvent
          properties:
            event_id:
              type: string
              description: Unique reference to this request event
              example: 9755c355-56c3-4a2f-a2da-86ff4411fccb
            unified_api:
              description: Name of Apideck Unified API
              x-apideck-enum-id: unified_api
              enum:
                - accounting
                - ats
                - calendar
                - crm
                - csp
                - customer-support
                - ecommerce
                - email
                - email-marketing
                - expense-management
                - file-storage
                - form
                - hris
                - lead
                - payroll
                - pos
                - procurement
                - project-management
                - script
                - sms
                - spreadsheet
                - team-messaging
                - issue-tracking
                - time-registration
                - transactional-email
                - vault
                - data-warehouse
              example: crm
              type: string
            service_id:
              type: string
              description: Service provider identifier
              example: close
            consumer_id:
              type: string
              example: test_consumer_id
              description: Unique consumer identifier. You can freely choose a consumer ID yourself. Most of the time, this is an ID of your internal data model that represents a user or account in your system (for example account:12345). If the consumer doesn't exist yet, Vault will upsert a consumer based on your ID.
            entity_id:
              type: string
              description: The service provider's ID of the entity that triggered this event
              example: 123456ASDF
            entity_type:
              type: string
              description: The type entity that triggered this event
              example: Company
            entity_url:
              type: string
              description: The url to retrieve entity detail.
              example: https://unify.apideck.com/crm/contacts/123456
            execution_attempt:
              type: number
              description: The current count this request event has been attempted
              example: 2
            occurred_at:
              type: string
              description: ISO Datetime for when the original event occurred
              example: '2021-10-01T03:14:55.419Z'
        - type: object
          properties:
            event_type:
              $ref: '#/components/schemas/AccountingEventType'
    CreateQuoteResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Quotes
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
    DeleteQuoteResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Quotes
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
    GetQuoteResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Quotes
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Quote'
    GetQuotesResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Quotes
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Quote'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
    Quote:
      type: object
      x-apideck-schema-id: Quote
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: low
        type: high
        number: high
        customer: high
        invoice_id: medium
        sales_order_id: medium
        company_id: medium
        department_id: low
        project_id: medium
        quote_date: edge-case
        expiry_date: edge-case
        terms: low
        terms_id: edge-case
        reference: low
        status: critical
        currency: medium
        currency_rate: low
        tax_inclusive: low
        sub_total: high
        total_tax: high
        tax_code: medium
        discount_percentage: medium
        discount_amount: medium
        total: critical
        customer_memo: low
        line_items: critical
        billing_address: high
        shipping_address: medium
        tracking_categories: medium
        template_id: edge-case
        source_document_url: edge-case
        custom_fields: medium
        row_version: low
        updated_by: low
        created_by: low
        created_at: high
        updated_at: high
        pass_through: low
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        number:
          type: string
          title: Quote number
          description: Quote number.
          example: QT00546
          nullable: true
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        invoice_id:
          $ref: '#/components/schemas/AccountingInvoiceId'
        sales_order_id:
          $ref: '#/components/schemas/AccountingSalesOrderId'
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        project_id:
          $ref: '#/components/schemas/AccountingProjectId'
        quote_date:
          type: string
          title: Quote date
          description: Date quote was issued - YYYY-MM-DD.
          format: date
          example: '2020-09-30'
          nullable: true
        expiry_date:
          type: string
          title: Expiry date
          description: The date until which the quote is valid - YYYY-MM-DD.
          format: date
          example: '2020-10-30'
          nullable: true
        terms:
          type: string
          title: Terms
          description: Terms of the quote.
          example: Valid for 30 days
          nullable: true
        terms_id:
          $ref: '#/components/schemas/TermsId'
        reference:
          $ref: '#/components/schemas/Reference'
        status:
          type: string
          title: Status
          description: Quote status
          example: draft
          x-apideck-enum-id: quotes.status
          enum:
            - draft
            - sent
            - accepted
            - rejected
            - expired
            - converted
            - void
            - deleted
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        currency_rate:
          $ref: '#/components/schemas/CurrencyRate'
        tax_inclusive:
          $ref: '#/components/schemas/TaxInclusive'
        sub_total:
          title: Sub-total amount
          description: Sub-total amount, normally before tax.
          type: number
          example: 27500
          nullable: true
        total_tax:
          type: number
          title: Total tax amount
          description: Total tax amount applied to this quote.
          example: 2500
          nullable: true
        tax_code:
          type: string
          title: Tax Code
          description: Applicable tax id/code override if tax is not supplied on a line item basis.
          example: '1234'
          nullable: true
        discount_percentage:
          type: number
          title: Discount Percent
          description: Discount percentage applied to this quote.
          example: 5.5
          nullable: true
        discount_amount:
          type: number
          title: Discount Amount
          description: Discount amount applied to this quote.
          example: 25
          nullable: true
        total:
          type: number
          title: Total amount
          description: Total amount of quote, including tax.
          example: 27500
          nullable: true
        customer_memo:
          type: string
          title: Customer memo
          description: Customer memo
          example: Thank you for considering our services!
          nullable: true
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/QuoteLineItem'
        billing_address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        template_id:
          type: string
          title: Template
          description: Optional quote template
          example: '123456'
          nullable: true
        source_document_url:
          type: string
          title: Source document URL
          description: URL link to a source document - shown as 'Go to [appName]' in the downstream app.
          example: https://www.quotesolution.com/quote/123456
          nullable: true
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        pass_through:
          $ref: '#/components/schemas/PassThroughBody'
    QuoteLineItem:
      type: object
      title: Quote Line Item
      x-apideck-schema-id: QuoteLineItem
      additionalProperties: false
      x-apideck-weights:
        id: high
        row_id: edge-case
        code: medium
        line_number: medium
        description: high
        type: medium
        tax_amount: high
        total_amount: high
        quantity: high
        unit_price: high
        unit_of_measure: edge-case
        discount_percentage: low
        discount_amount: low
        service_date: medium
        category_id: low
        location_id: low
        department_id: low
        item: high
        tax_rate: medium
        ledger_account: low
        tracking_categories: low
        custom_fields: medium
        row_version: edge-case
        created_at: edge-case
        updated_at: high
        updated_by: edge-case
        created_by: edge-case
      properties:
        id:
          $ref: '#/components/schemas/WritableId'
        row_id:
          type: string
          title: Row ID
          description: Row ID
          example: '12345'
        code:
          type: string
          title: Item code
          description: User defined item code
          example: 120-C
          nullable: true
        line_number:
          $ref: '#/components/schemas/LineNumber'
        description:
          type: string
          title: Description
          description: User defined description
          example: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
          nullable: true
        type:
          type: string
          title: Type
          description: Item type
          example: sales_item
          x-apideck-enum-id: quotes-line-items.type
          enum:
            - sales_item
            - discount
            - info
            - sub_total
            - service
            - other
          nullable: true
        tax_amount:
          type: number
          title: Tax amount
          description: Tax amount
          example: 27500
          nullable: true
        total_amount:
          type: number
          title: Total amount
          description: Total amount of the line item
          example: 27500
          nullable: true
        quantity:
          $ref: '#/components/schemas/Quantity'
        unit_price:
          $ref: '#/components/schemas/UnitPrice'
        unit_of_measure:
          $ref: '#/components/schemas/UnitOfMeasure'
        discount_percentage:
          type: number
          title: Discount Percentage
          description: Discount percentage applied to the line item when supported downstream.
          example: 0.01
          nullable: true
        discount_amount:
          type: number
          title: Discount Amount
          description: Discount amount applied to the line item when supported downstream.
          example: 19.99
          nullable: true
        service_date:
          type: string
          format: date
          title: Service Date
          description: Date on which the service was provided or performed - YYYY-MM-DD.
          example: '2024-01-15'
          nullable: true
        category_id:
          type: string
          title: Category ID
          description: ID of the category of the line item
          example: '12345'
          nullable: true
        location_id:
          $ref: '#/components/schemas/LocationId'
        department_id:
          $ref: '#/components/schemas/DepartmentId'
        item:
          $ref: '#/components/schemas/LinkedInvoiceItem'
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        ledger_account:
          $ref: '#/components/schemas/LinkedLedgerAccount'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
    UpdateQuoteResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Quotes
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
    ExpensesFilter:
      type: object
      x-apideck-schema-id: ExpensesFilter
      example:
        updated_since: '2020-09-30T07:43:32.000Z'
        status: draft
        type: expense
      properties:
        updated_since:
          type: string
          title: Updated since (timestamp)
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
        status:
          type: string
          enum:
            - draft
            - posted
            - voided
          x-apideck-enum-id: expenses.status
        type:
          type: string
          enum:
            - expense
            - refund
          x-apideck-enum-id: expenses.type
      additionalProperties: false
    CreateProjectResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Projects
        operation:
          type: string
          description: Operation performed
          example: add
        data:
          $ref: '#/components/schemas/UnifiedId'
    DeleteProjectResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Projects
        operation:
          type: string
          description: Operation performed
          example: delete
        data:
          $ref: '#/components/schemas/UnifiedId'
    GetProjectResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Projects
        operation:
          type: string
          description: Operation performed
          example: one
        data:
          $ref: '#/components/schemas/Project'
    GetProjectsResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Projects
        operation:
          type: string
          description: Operation performed
          example: all
        data:
          type: array
          items:
            $ref: '#/components/schemas/Project'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
    Project:
      type: object
      x-apideck-schema-id: Project
      additionalProperties: false
      x-apideck-weights:
        id: critical
        downstream_id: edge-case
        name: critical
        display_id: medium
        reference_id: medium
        description: medium
        status: high
        active: high
        project_type: medium
        priority: medium
        completion_percentage: medium
        completion_date: medium
        start_date: medium
        end_date: medium
        customer: high
        department: medium
        company_id: medium
        owner_id: medium
        parent_project: low
        currency: medium
        budget_amount: medium
        approved_amount: medium
        actual_amount: low
        budget_hours: medium
        actual_hours: low
        hourly_rate: medium
        billing_method: medium
        is_billable: medium
        phase: medium
        tax_rate: medium
        tracking_categories: medium
        custom_fields: medium
        tags: low
        notes: low
        contract_number: medium
        profit_margin: medium
        schedule_status: medium
        addresses: medium
        team_size: low
        updated_by: edge-case
        created_by: edge-case
        updated_at: medium
        created_at: medium
        row_version: edge-case
      required:
        - name
      properties:
        id:
          $ref: '#/components/schemas/Id'
        downstream_id:
          $ref: '#/components/schemas/DownstreamId'
        name:
          type: string
          title: Project name
          description: Name of the project
          example: Website Redesign Project
          minLength: 1
        display_id:
          type: string
          title: Display ID
          description: User-friendly project identifier
          example: PROJ-001
          nullable: true
        reference_id:
          type: string
          title: Reference ID
          description: External reference identifier for the project
          example: WD-REF-2024-001
          nullable: true
        description:
          type: string
          title: Description
          description: Detailed description of the project
          example: Complete redesign of the company website including new branding and improved user experience
          nullable: true
        status:
          type: string
          title: Project Status
          description: Current status of the project
          example: active
          enum:
            - active
            - completed
            - on_hold
            - cancelled
            - draft
            - in_progress
            - approved
            - other
          x-apideck-enum-id: project.status
          nullable: true
        active:
          type: boolean
          title: Active
          description: Indicates whether the project is currently active or inactive
          example: true
          nullable: true
        project_type:
          type: string
          title: Project Type
          description: Type or category of the project
          example: client_project
          enum:
            - client_project
            - internal_project
            - maintenance
            - research_development
            - training
            - other
          x-apideck-enum-id: project.project_type
          nullable: true
        priority:
          type: string
          title: Priority
          description: Priority level of the project
          example: high
          enum:
            - low
            - medium
            - high
            - critical
          x-apideck-enum-id: project.priority
          nullable: true
        completion_percentage:
          type: number
          minimum: 0
          maximum: 100
          title: Completion Percentage
          description: Percentage of project completion (0-100)
          example: 75.5
          nullable: true
        start_date:
          type: string
          format: date
          title: Start Date
          description: Start date of the project
          example: '2024-01-15'
          nullable: true
        end_date:
          type: string
          format: date
          title: End Date
          description: Expected or planned end date of the project
          example: '2024-06-30'
          nullable: true
        completion_date:
          type: string
          format: date
          title: End Date
          description: Actual end date of the project
          example: '2024-08-06'
          nullable: true
        customer:
          $ref: '#/components/schemas/LinkedCustomer'
        department:
          type: object
          title: Department
          description: Department or organizational unit associated with the project
          nullable: true
          properties:
            id:
              type: string
              title: Department ID
              description: Unique identifier for the department
              example: DEPT-001
            name:
              type: string
              title: Department Name
              description: Name of the department
              example: Marketing
        company_id:
          $ref: '#/components/schemas/AccountingCompanyId'
        owner_id:
          type: string
          title: Owner ID
          description: ID of the user who owns/manages this project
          example: '12345'
          nullable: true
        parent_project:
          type: object
          title: Parent Project
          description: Parent project if this is a subproject
          nullable: true
          properties:
            id:
              type: string
              title: Parent Project ID
              description: Unique identifier for the parent project
              example: PROJ-PARENT-001
            name:
              type: string
              title: Parent Project Name
              description: Name of the parent project
              example: Company Website Overhaul
        currency:
          $ref: '#/components/schemas/Currency'
        budget_amount:
          type: number
          multipleOf: 0.01
          title: Budget Amount
          description: Total budgeted amount for the project
          example: 50000
          nullable: true
        approved_amount:
          type: number
          multipleOf: 0.01
          title: Approved Amount
          description: Approved budget amount for the project
          example: 48000
          nullable: true
        actual_amount:
          type: number
          multipleOf: 0.01
          title: Actual Amount
          description: Total actual amount spent on the project
          example: 45250.75
          nullable: true
          readOnly: true
        budget_hours:
          type: number
          title: Budget Hours
          description: Total budgeted hours for the project
          example: 400
          nullable: true
        actual_hours:
          type: number
          title: Actual Hours
          description: Total actual hours worked on the project
          example: 385.5
          nullable: true
          readOnly: true
        hourly_rate:
          type: number
          multipleOf: 0.01
          title: Hourly Rate
          description: Default hourly rate for project work
          example: 125
          nullable: true
        billing_method:
          type: string
          title: Billing Method
          description: Method used for billing this project
          example: time_and_materials
          enum:
            - fixed_price
            - time_and_materials
            - milestone_based
            - retainer
            - non_billable
          x-apideck-enum-id: project.billing_method
          nullable: true
        is_billable:
          type: boolean
          title: Is Billable
          description: Indicates if the project is billable to the customer
          example: true
          default: true
          nullable: true
        phase:
          type: string
          title: Project Phase
          description: Current phase of the project lifecycle
          example: execution
          enum:
            - initiation
            - planning
            - execution
            - monitoring
            - closure
            - other
          x-apideck-enum-id: project.phase
          nullable: true
        tax_rate:
          $ref: '#/components/schemas/LinkedTaxRate'
        tracking_categories:
          $ref: '#/components/schemas/LinkedTrackingCategories'
        tags:
          type: array
          items:
            type: string
          title: Tags
          description: Tags associated with the project
          example: &ref_1
            - website
            - redesign
            - urgent
        notes:
          type: string
          title: Notes
          description: Additional notes about the project
          example: Client has requested modern design with mobile-first approach
          nullable: true
        contract_number:
          type: string
          title: Contract Number
          description: Contract or agreement number associated with the project
          example: CNT-2024-001
          nullable: true
        profit_margin:
          type: number
          title: Profit Margin
          description: Expected profit margin percentage for the project
          example: 15.5
          minimum: 0
          maximum: 100
          nullable: true
        schedule_status:
          type: string
          title: Schedule Status
          description: Current status of project schedule compared to plan
          example: on_schedule
          enum:
            - ahead_of_schedule
            - on_schedule
            - behind_schedule
            - critical_delay
          x-apideck-enum-id: project.schedule_status
          nullable: true
        addresses:
          type: array
          title: Addresses
          description: An array of addresses associated with the project (billing, job site, etc.)
          items:
            $ref: '#/components/schemas/Address'
        team_size:
          type: integer
          title: Team Size
          description: Number of team members assigned to the project
          example: 8
          minimum: 0
          nullable: true
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        row_version:
          $ref: '#/components/schemas/RowVersion'
        updated_by:
          $ref: '#/components/schemas/UpdatedBy'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
    ProjectsFilter:
      type: object
      x-apideck-schema-id: ProjectsFilter
      example:
        name: Website Redesign
        status: active
        customer_id: '12345'
        is_billable: true
        is_active: true
        updated_since: '2020-09-30T07:43:32.000Z'
      properties:
        name:
          type: string
          title: Project Name
          description: Name of project to search for
          example: Website Redesign
        status:
          type: string
          title: Project Status
          description: Status of projects to filter by
          example: active
          x-apideck-enum-id: projects.status
          enum:
            - active
            - completed
            - on_hold
            - cancelled
            - draft
            - in_progress
            - approved
            - other
        customer_id:
          type: string
          title: Customer ID
          description: Filter projects by customer ID
          example: '12345'
        updated_since:
          type: string
          format: date-time
          title: Updated Since
          description: Return projects modified after this date
          example: '2020-09-30T07:43:32.000Z'
    ProjectsSort:
      type: object
      x-apideck-schema-id: ProjectsSort
      properties:
        by:
          type: string
          title: Sort by
          description: The field to sort by
          x-apideck-enum-id: projects.sort_by
          enum:
            - name
            - status
            - start_date
            - end_date
            - budget_amount
            - actual_amount
            - created_at
            - updated_at
          example: name
        direction:
          $ref: '#/components/schemas/SortDirection'
    UpdateProjectResponse:
      type: object
      required:
        - status_code
        - status
        - service
        - resource
        - operation
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        service:
          type: string
          description: Apideck ID of service provider
          example: quickbooks
        resource:
          type: string
          description: Unified API resource name
          example: Projects
        operation:
          type: string
          description: Operation performed
          example: update
        data:
          $ref: '#/components/schemas/UnifiedId'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: |
        To access our API, you need to sign up and obtain your unique API key. Each Unify application is assigned a single API key. You can locate your API key in the Configuration Settings section of your Apideck application. Additionally, your application’s application_id is available on the same page.

        Authenticate your API requests by including your test or live secret API key in the request header.

        - Bearer authorization header: `Authorization: Bearer "YOUR_API_KEY_HERE"`
        - Application id header: `x-apideck-app-id: "YOUR_APP_ID_HERE"`

        You should use the public keys on the SDKs and the secret keys to authenticate API requests.

        **Do not share or include your secret API keys on client side code.** Your API keys carry significant privileges. Please ensure to keep them 100% secure and be sure to not share your secret API keys in areas that are publicly accessible like GitHub.

        Learn how to set the Authorization header inside Postman https://learning.postman.com/docs/postman/sending-api-requests/authorization/#api-key

        Go to Unify to grab your API KEY https://app.apideck.com/unify/api-keys
security:
  - apiKey: []
tags:
  - name: Bills
    description: A Bill represents an invoice from a supplier, including line items, amounts, due date, payment status, and linked supplier.
    x-apideck-resource-id: bills
    x-apideck-model:
      $ref: '#/components/schemas/Bill'
  - name: Company Info
    description: Company Info contains the organization's profile data including legal name, addresses, tax identifiers, currency, and fiscal year settings.
    x-apideck-resource-id: company-info
    x-apideck-model:
      $ref: '#/components/schemas/CompanyInfo'
  - name: Companies
    description: List companies accessible through the current connection. Only available for multi-company connectors.
    x-apideck-resource-id: companies
    x-apideck-model:
      $ref: '#/components/schemas/AccountingConnectionCompany'
  - name: Credit Notes
    description: A Credit Note represents a reduction in the amount owed by a customer, including line items, amounts, and the linked customer or invoice.
    x-apideck-resource-id: credit-notes
    x-apideck-model:
      $ref: '#/components/schemas/CreditNote'
  - name: Customers
    description: A Customer represents a buyer or client, including contact details, billing and shipping addresses, tax information, and payment terms.
    x-apideck-resource-id: customers
    x-apideck-model:
      $ref: '#/components/schemas/Customer'
  - name: Invoices
    description: An Invoice represents a sales document sent to customers, including line items, taxes, discounts, totals, due date, and payment status.
    x-apideck-resource-id: invoices
    x-apideck-model:
      $ref: '#/components/schemas/Invoice'
  - name: Invoice Items
    description: An Invoice Item represents a reusable product or service that can be added to invoices, including name, description, price, and tax settings.
    x-apideck-resource-id: invoice-items
    x-apideck-model:
      $ref: '#/components/schemas/InvoiceItem'
  - name: Ledger Accounts
    description: A Ledger Account represents an entry in the chart of accounts, including name, code, type (asset, liability, equity, revenue, expense), and balance.
    x-apideck-resource-id: ledger-accounts
    x-apideck-model:
      $ref: '#/components/schemas/LedgerAccount'
  - name: Payments
    description: A Payment represents money received from a customer, including amount, date, payment method, and allocation to one or more invoices.
    x-apideck-resource-id: payments
    x-apideck-model:
      $ref: '#/components/schemas/Payment'
  - name: Refunds
    description: A Refund represents money returned to a customer, supporting both itemized refunds (with line items) and allocation-based refunds (applied to invoices, credit notes, or overpayments).
    x-apideck-resource-id: refunds
    x-apideck-model:
      $ref: '#/components/schemas/Refund'
  - name: Suppliers
    description: A Supplier represents a vendor or service provider, including contact information, addresses, tax details, and payment terms.
    x-apideck-resource-id: suppliers
    x-apideck-model:
      $ref: '#/components/schemas/Supplier'
  - name: Tax Rates
    description: A Tax Rate defines a tax percentage applied to transactions, including name, rate, tax type, and applicable regions or conditions.
    x-apideck-resource-id: tax-rates
    x-apideck-model:
      $ref: '#/components/schemas/TaxRate'
  - name: Balance Sheet
    description: A Balance Sheet report shows the financial position at a point in time, including totals for assets, liabilities, and equity accounts.
    x-apideck-resource-id: balance-sheet
    x-apideck-model:
      $ref: '#/components/schemas/BalanceSheet'
  - name: Profit and Loss
    description: A Profit and Loss report shows financial performance over a period, including revenue, cost of sales, expenses, and net income.
    x-apideck-resource-id: profit-and-loss
    x-apideck-model:
      $ref: '#/components/schemas/ProfitAndLoss'
  - name: Journal Entries
    description: A Journal Entry represents a manual accounting entry with debit and credit line items, memo, posting date, and status.
    x-apideck-resource-id: journal-entries
    x-apideck-model:
      $ref: '#/components/schemas/JournalEntry'
  - name: Purchase Orders
    description: A Purchase Order represents a request to buy goods or services from a supplier, including line items, amounts, delivery date, and status.
    x-apideck-resource-id: purchase-orders
    x-apideck-model:
      $ref: '#/components/schemas/PurchaseOrder'
  - name: Subsidiaries
    description: A Subsidiary represents a child company within an organization, including name, status, and parent company relationship.
    x-apideck-resource-id: subsidiaries
    x-apideck-model:
      $ref: '#/components/schemas/Subsidiary'
  - name: Locations
    description: A Location represents a physical business site, including name, address, and status for multi-location tracking.
    x-apideck-resource-id: locations
    x-apideck-model:
      $ref: '#/components/schemas/AccountingLocation'
  - name: Departments
    description: A Department represents an organizational unit, including name, code, and parent department for hierarchical structures.
    x-apideck-resource-id: departments
    x-apideck-model:
      $ref: '#/components/schemas/AccountingDepartment'
  - name: Attachments
    description: An Attachment represents a file linked to an accounting document, including file name, URL, content type, and the parent record reference.
    x-apideck-resource-id: attachments
    x-apideck-model:
      $ref: '#/components/schemas/Attachment'
  - name: Bank Accounts
    description: A Bank Account represents a financial account, including account name, number, type (checking, savings, credit card), currency, and balance.
    x-apideck-resource-id: bank-accounts
    x-apideck-model:
      $ref: '#/components/schemas/AccountingBankAccount'
  - name: Tracking Categories
    description: A Tracking Category represents a classification dimension for reporting, including name, code, status, and parent category for hierarchies.
    x-apideck-resource-id: tracking-categories
    x-apideck-model:
      $ref: '#/components/schemas/TrackingCategory'
  - name: Bill Payments
    description: A Bill Payment represents money paid to a supplier, including amount, date, payment method, and allocation to one or more bills.
    x-apideck-resource-id: bill-payments
    x-apideck-model:
      $ref: '#/components/schemas/BillPayment'
  - name: Expenses
    description: An Expense represents a business expenditure, including amount, date, category, payment method, merchant, and account allocation.
    x-apideck-resource-id: expenses
    x-apideck-model:
      $ref: '#/components/schemas/Expense'
  - name: Aged Creditors
    description: Aged Creditors is a report showing amounts owed to suppliers, grouped by aging periods (current, 30, 60, 90+ days) with supplier details.
    x-apideck-resource-id: aged-creditors
    x-apideck-model:
      $ref: '#/components/schemas/AgedCreditors'
  - name: Aged Debtors
    description: Aged Debtors is a report showing amounts owed by customers, grouped by aging periods (current, 30, 60, 90+ days) with customer details.
    x-apideck-resource-id: aged-debtors
    x-apideck-model:
      $ref: '#/components/schemas/AgedDebtors'
  - name: Bank Feed Accounts
    description: A Bank Feed Account represents a connected financial institution account, including account details and connection status for transaction imports.
    x-apideck-resource-id: bank-feed-accounts
    x-apideck-model:
      $ref: '#/components/schemas/BankFeedAccount'
  - name: Bank Feed Statements
    description: A Bank Feed Statement contains imported transaction data from a connected bank account, including statement period and transaction details.
    x-apideck-resource-id: bank-feed-statements
    x-apideck-model:
      $ref: '#/components/schemas/BankFeedStatement'
  - name: Categories
    description: A Category represents a product or service grouping, including name and type for organizing invoice and bill line items.
    x-apideck-resource-id: categories
    x-apideck-model:
      $ref: '#/components/schemas/Category'
  - name: Quotes
    description: A Quote represents a sales estimate sent to customers, including line items, amounts, expiry date, and status before conversion to invoice.
    x-apideck-resource-id: quotes
    x-apideck-model:
      $ref: '#/components/schemas/Quote'
  - name: Projects
    description: A Project represents a job or engagement, including name, customer, budget amounts, budget hours, billing method, status, and profitability data.
    x-apideck-resource-id: projects
    x-apideck-model:
      $ref: '#/components/schemas/Project'
  - name: Employees
    description: An Employee represents an individual within the organization for accounting purposes, including name, department, hire date, and employment status.
    x-apideck-resource-id: employees
    x-apideck-model:
      $ref: '#/components/schemas/AccountingEmployee'
  - name: Expense Categories
    description: An Expense Category classifies types of expenses within the organization, such as travel, meals, or office supplies. Used to categorize expense report line items.
    x-apideck-resource-id: expense-categories
    x-apideck-model:
      $ref: '#/components/schemas/ExpenseCategory'
  - name: Expense Reports
    description: An Expense Report is a collection of expense line items submitted by an employee for reimbursement, including amounts, categories, and approval status.
    x-apideck-resource-id: expense-reports
    x-apideck-model:
      $ref: '#/components/schemas/ExpenseReport'
paths:
  /accounting/tax-rates:
    get:
      tags:
        - Tax Rates
      operationId: taxRatesAll
      summary: List Tax Rates
      description: |
        List Tax Rates. Note: Not all connectors return the actual rate/percentage value. In this case, only the tax code or reference is returned. Connectors Affected: Quickbooks
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/taxRatesFilter'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation. NetSuite supports compound taxes through the `components` array, allowing multi-tier tax structures (e.g., state + county taxes).
        - connector: quickbooks
          description: |
            In quickbooks, the tax rates resource does not support pagination. QuickBooks returns tax codes rather than complete tax rate data. The `effective_tax_rate` may not be populated; use `code` to reference the tax in invoice line items.
        - connector: xero
          description: |
            Xero tax rates include `effective_tax_rate` for the combined percentage. Tax types are categorized as INPUT (purchases), OUTPUT (sales), or NONE. Use the appropriate tax type when applying rates to invoices vs bills.
        - connector: sage-intacct
          description: |
            Sage Intacct supports multi-component taxes through the `components` array. Each component can have its own rate and tax authority. Use compound taxes for jurisdictions with multiple tax layers (e.g., GST + PST in Canada).
      responses:
        '200':
          $ref: '#/components/responses/GetTaxRatesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Tax Rates
      operationId: taxRatesAdd
      summary: Create Tax Rate
      description: Create Tax Rate
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            To create a tax rate, `effective_tax_rate`, `tax_payable_account_id`, `name` and a `component` is required. If `tax_payable_account_id` is unknown, make a proxy call to get list of TaxAgency. [TaxAgency doc](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/taxagency#query-a-taxagency)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxRate'
      responses:
        '201':
          $ref: '#/components/responses/CreateTaxRateResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            taxRate:
              id: '1234'
              display_id: '12345'
              name: GST on Purchases
              code: ABN
              description: Reduced rate GST Purchases
              effective_tax_rate: 10
              country: US
              total_tax_rate: 10
              tax_payable_account_id: '123456'
              tax_remitted_account_id: '123456'
              components:
                - id: '10'
                  name: GST
                  rate: 10
                  compound: true
              type: NONE
              report_tax_type: NONE
              original_tax_rate_id: '12345'
              status: active
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              subsidiaries:
                - id: string
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
  /accounting/tax-rates/{id}:
    get:
      tags:
        - Tax Rates
      operationId: taxRatesOne
      summary: Get Tax Rate
      description: |
        Get Tax Rate. Note: Not all connectors return the actual rate/percentage value. In this case, only the tax code or reference is returned. Support will soon be added to return the actual rate/percentage by doing additional calls in the background to provide the full view of a given tax rate. Connectors Affected: Quickbooks
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetTaxRateResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Tax Rates
      operationId: taxRatesUpdate
      summary: Update Tax Rate
      description: Update Tax Rate
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxRate'
      responses:
        '200':
          $ref: '#/components/responses/UpdateTaxRateResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            taxRate:
              id: '1234'
              display_id: '12345'
              name: GST on Purchases
              code: ABN
              description: Reduced rate GST Purchases
              effective_tax_rate: 10
              country: US
              total_tax_rate: 10
              tax_payable_account_id: '123456'
              tax_remitted_account_id: '123456'
              components:
                - id: '10'
                  name: GST
                  rate: 10
                  compound: true
              type: NONE
              report_tax_type: NONE
              original_tax_rate_id: '12345'
              status: active
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              subsidiaries:
                - id: string
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
    delete:
      tags:
        - Tax Rates
      operationId: taxRatesDelete
      summary: Delete Tax Rate
      description: Delete Tax Rate
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteTaxRateResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/bills:
    get:
      tags:
        - Bills
      operationId: billsAll
      summary: List Bills
      description: List Bills
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/billsFilter'
        - $ref: '#/components/parameters/billsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: afas
          description: |
            AFAS Profit has no first-party purchase-invoice GetConnector on most tenants. The default `purchase_invoices_connector` setting (`Profit_Creditor_Invoices`) is the open-items / aged-creditors report — it only returns purchase invoices that are still unpaid. Posted-and-cleared invoices will not appear.

            To list all bills (paid + open), the customer must deploy a tenant-specific GetConnector (e.g. one over `FbInkfct`) and set its name on the connection via `purchase_invoices_connector`.

            The `limit` parameter may return fewer bills than specified. AFAS returns flat purchase-invoice line rows which are grouped by `OrderNumber` into complete bills. `limit=N` caps the raw row count, not the grouped bill count, so a single `limit=10` request can return 3 bills (rows span 3 invoices) or 10 (every row is a different invoice).
        - connector: clearbooks-uk
          description: Clearbooks does not support setting the pagination size.
        - connector: freshbooks
          description: The Freshbooks Bills api is currently in beta.
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: spiris
          description: |
            Spiris (Visma eAccounting) does not expose per-payment detail on the bill response. To check whether a bill is paid, use the `balance` and `total` fields:

            - `balance === 0` → fully paid
            - `balance < total` → partially paid (reflected in `status: partially_paid`)
            - `balance === total` → unpaid (reflected in `status: authorised`)

            `status` is derived from Spiris's `Status` field combined with `RemainingAmount`, not from `Status` alone.

            Per-payment records (payment date, amount, bank account) are scoped under `/supplierinvoices/{id}/payments` in the Spiris API and are not surfaced on the unified Bill. Bill payments can be created via `POST /bill-payments` but not listed or retrieved individually through the unified API.
      responses:
        '200':
          $ref: '#/components/responses/GetBillsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Bills
      operationId: billsAdd
      summary: Create Bill
      description: Create Bill
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: |
            When providing both supplier.id and supplier.display_name (or supplier.name), Xero will update the contact's name if the ContactID exists. If the ContactID doesn't exist, Xero will automatically create a new contact using the provided name. This allows for automatic contact creation but may update existing contact names if the display_name differs from the stored name.
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the language field: EN, FI, SV, ET, NO, and DA.
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: quickbooks
          description: |
            When creating a bill in QuickBooks, each line item must be accompanied by a type designation. If the type is set to "expense_item," an item ID is required. Conversely, if the type is "expense_account," a ledger account ID must be provided.
            Additionally, multicurrency needs to be enabled in your QBO account. If creating a bill in your default currency, you do not need to send the currency value as long as the supplier uses the same currency. For bills with suppliers using a different currency than your default, you must include the currency value, matching the supplier's configured currency. To change the currency of a customer or vendor, a new one must be created with the desired currency. Foreign currencies can only be sent to suppliers configured with that currency.
        - connector: netsuite
          description: |
            For creating or updating a bill in Netsuite, its required to provide the line type.
        - connector: microsoft-dynamics-365-business-central
          description: |
            If you encounter a '400 Bad Request' error indicating "Control 'fieldName' is read-only" it means the 'editable' property for this field in Microsoft Dynamics 365 Business Central is currently set to false. To resolve this issue and make the field writable, simply update the 'editable' property to true in Microsoft Dynamics 365 Business Central. Additionally, line item tax rates must be specified by tax rate *code* (e.g., "G3"), not by ID. In U.S.-regionalized Business Central tenants, the `tax_inclusive` field cannot be set to `true`.
        - connector: zoho-books
          description: |
            The status of the bill will be "submitted" by default when creating a bill.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Bill'
      responses:
        '201':
          $ref: '#/components/responses/CreateBillResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            bill:
              display_id: '123456'
              bill_number: '10001'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              bill_date: '2020-09-30'
              due_date: '2020-10-30'
              paid_date: '2020-10-30'
              po_number: '90000117'
              reference: INV-2024-001
              line_items:
                - row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: expense_account
                  tax_amount: 27.5
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  category_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  retention_amount: 1000
                  payment_amount: 1000
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  purchase_order:
                    id: '123456'
                    line_id: '123456'
                    line_number: '1'
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  rebilling:
                    rebillable: true
                    rebill_status: billed
                    linked_transaction_id: txn_abc123
                    linked_transaction_line_id: line_xyz789
                  row_version: 1-12345
                  worktags:
                    - id: '123456'
                      value: New York
              terms: Net 30 days
              terms_id: '12345'
              balance: 27500
              deposit: 0
              sub_total: 250
              total_tax: 25
              total: 27500
              tax_code: '1234'
              notes: Some notes about this bill.
              status: draft
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              payment_method: cash
              channel: email
              language: EN
              accounting_by_row: false
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              discount_percentage: 5.5
              template_id: '123456'
              approved_by: John Doe
              amortization_type: manual
              tax_method: Due to supplier
              document_received: true
              source_document_url: https://www.invoicesolution.com/bill/123456
              payment_allocations:
                - id: '123456'
                  allocated_amount: 1000
                  date: '2020-09-30T07:43:32.000Z'
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              row_version: 1-12345
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              accounting_period: 01-24
              attachments:
                - name: sample.jpg
                  mime_type: image/jpeg
                  is_compressed: false
                  encoding: base64
                  content: data:image/jpeg;base64,...
                  notes: A sample image
  /accounting/bills/{id}:
    get:
      tags:
        - Bills
      operationId: billsOne
      summary: Get Bill
      description: Get Bill
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: The Freshbooks Bills api is currently in beta.
      responses:
        '200':
          $ref: '#/components/responses/GetBillResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Bills
      operationId: billsUpdate
      summary: Update Bill
      description: Update Bill
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the language field: EN, FI, SV, ET, NO, and DA.
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: Quickbooks
          description: Quickbooks requires the supplier.id to be sent in order to make update operations.
        - connector: zoho-books
          description: |
            The allowed values for the status field are "draft", "submitted" and "void" when using the update method.
            Please send status updates separately from other bill updates.
        - connector: xero
          description: Bills in xero can be tax inclusive, tax exclusive or no tax. The tax_inclusive field should be set to true, false or null if the bill is tax inclusive, tax exclusive or no tax.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Bill'
      responses:
        '200':
          $ref: '#/components/responses/UpdateBillResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            bill:
              display_id: '123456'
              bill_number: '10001'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              bill_date: '2020-09-30'
              due_date: '2020-10-30'
              paid_date: '2020-10-30'
              po_number: '90000117'
              reference: INV-2024-001
              line_items:
                - row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: expense_account
                  tax_amount: 27.5
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  category_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  retention_amount: 1000
                  payment_amount: 1000
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  purchase_order:
                    id: '123456'
                    line_id: '123456'
                    line_number: '1'
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  rebilling:
                    rebillable: true
                    rebill_status: billed
                    linked_transaction_id: txn_abc123
                    linked_transaction_line_id: line_xyz789
                  row_version: 1-12345
                  worktags:
                    - id: '123456'
                      value: New York
              terms: Net 30 days
              terms_id: '12345'
              balance: 27500
              deposit: 0
              sub_total: 250
              total_tax: 25
              total: 27500
              tax_code: '1234'
              notes: Some notes about this bill.
              status: draft
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              payment_method: cash
              channel: email
              language: EN
              accounting_by_row: false
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              discount_percentage: 5.5
              template_id: '123456'
              approved_by: John Doe
              amortization_type: manual
              tax_method: Due to supplier
              document_received: true
              source_document_url: https://www.invoicesolution.com/bill/123456
              payment_allocations:
                - id: '123456'
                  allocated_amount: 1000
                  date: '2020-09-30T07:43:32.000Z'
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              row_version: 1-12345
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              accounting_period: 01-24
              attachments:
                - name: sample.jpg
                  mime_type: image/jpeg
                  is_compressed: false
                  encoding: base64
                  content: data:image/jpeg;base64,...
                  notes: A sample image
    delete:
      tags:
        - Bills
      operationId: billsDelete
      summary: Delete Bill
      description: Delete Bill
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            Delete will set the bill to inactive and will soft delete it, meaning it will stop appearing in the list API call. However, it can still be found via the get by id call.
      responses:
        '200':
          $ref: '#/components/responses/DeleteBillResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/invoices:
    get:
      tags:
        - Invoices
      operationId: invoicesAll
      summary: List Invoices
      description: List Invoices
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/invoicesFilter'
        - $ref: '#/components/parameters/invoicesSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: afas
          description: |
            AFAS Profit derives sales invoices from `Profit_SalesorderLines` (sales-orders feed). The `limit` parameter may return fewer invoices than specified — AFAS returns flat sales-order line rows which are grouped by `OrderNumber` into complete invoices. `limit=N` caps the raw row count, not the grouped invoice count.
        - connector: clearbooks-uk
          description: Clearbooks does not support setting the pagination size.
        - connector: netsuite
          description: |
            The minimum page size accepted for Netsuite is 5. The cursor for Netsuite expires if it has not been used within 15 minutes after its creation.
            When using filters or sort parameters (which trigger the SuiteQL path), `quantity` and `unit_price` on line items may reflect base-unit values (e.g., days) rather than selling-unit values (e.g., years) for items with Units of Measure (UOM) enabled. `total_amount` is always accurate regardless. Use the GET one endpoint for selling-unit quantities.
        - connector: xero
          description: |
            Invoices in Xero can be tax inclusive, tax exclusive, or no tax. The `tax_inclusive` field is set to `true` (tax inclusive), `false` (tax exclusive), or `null` (no tax). Line items include `tax_rate` references that link to the tax-rates resource.
        - connector: quickbooks
          description: |
            QuickBooks uses tax codes rather than tax rates. The `tax_rate` on line items references a tax code, which may not include the actual percentage value. To get the actual rate, retrieve the full tax rate details via the tax-rates endpoint.
      responses:
        '200':
          $ref: '#/components/responses/GetInvoicesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Invoices
      operationId: invoicesAdd
      summary: Create Invoice
      description: Create Invoice
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: |
            When providing both customer.id and customer.display_name (or customer.name), Xero will update the contact's name if the ContactID exists. If the ContactID doesn't exist, Xero will automatically create a new contact using the provided name. This allows for automatic contact creation but may update existing contact names if the display_name differs from the stored name.
        - connector: quickbooks
          description: Quickbooks offers limited (regional) support for applying discount on a Line Item. Including discount_percentage or discount_amount applies to entire invoice. The default type for a Line Item is a sales item if no type has been provided.
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the language field: EN, FI, SV, ET, NO, and DA.
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: microsoft-dynamics-365-business-central
          description: |
            If you encounter a '400 Bad Request' error indicating "Control 'fieldName' is read-only" it means the 'editable' property for this field in Microsoft Dynamics 365 Business Central is currently set to false. To resolve this issue and make the field writable, simply update the 'editable' property to true in Microsoft Dynamics 365 Business Central.
        - connector: freshbooks
          description: |
            The status field can be set to either "submitted", "partially_paid", "paid" or "draft". The due_date and invoice_date fields are required for the invoice to be created.
        - connector: zoho-books
          description: |
            By default, the status of the invoice will be set to "draft".
        - connector: netsuite
          description: |
            Netsuite only supports one tracking category at a time so only the first item in the tracking_categories list will be used. While creating an invoice, revenue start date and revenue end date should be passed in the custom fields object inside the line items.
        - connector: workday
          description: |
            It is required to provide tracking_categories.id in the line items, which corresponds to the worktag/cost_center_id in Workday. It is required to provide the item.id in the line items.
        - connector: myob-acumatica
          description: |
            When filling line items, you can either link an existing item by providing the item code or create a new item by filling in the item details. Using both options at the same time is not supported.
        - connector: acumatica
          description: |
            When filling line items, you can either link an existing item by providing the item code or create a new item by filling in the item details. Using both options at the same time is not supported.
        - connector: access-financials
          description: |
            Access Financials creates invoices as live/posted transactions immediately. Live transactions cannot be updated, so to correct an invoice you must create a credit note and issue a new invoice.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice'
      responses:
        '201':
          $ref: '#/components/responses/CreateInvoiceResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            invoice:
              display_id: '123456'
              type: service
              number: OIT00546
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              invoice_date: '2020-09-30'
              due_date: '2020-09-30'
              terms: Net 30 days
              terms_id: '12345'
              po_number: '90000117'
              reference: INV-2024-001
              status: draft
              invoice_sent: true
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 27500
              total_tax: 2500
              tax_code: '1234'
              discount_percentage: 5.5
              discount_amount: 25
              total: 27500
              balance: 27500
              deposit: 0
              customer_memo: Thank you for your business and have a great day!
              tracking_category:
                id: '123456'
                name: New York
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              template_id: '123456'
              source_document_url: https://www.invoicesolution.com/invoice/123456
              payment_allocations:
                - id: '123456'
                  allocated_amount: 1000
                  date: '2020-09-30T07:43:32.000Z'
              payment_method: cash
              channel: email
              language: EN
              accounting_by_row: false
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/invoices/{id}:
    get:
      tags:
        - Invoices
      operationId: invoicesOne
      summary: Get Invoice
      description: Get Invoice
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetInvoiceResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Invoices
      operationId: invoicesUpdate
      summary: Update Invoice
      description: Update Invoice
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            Quickbooks offers limited (regional) support for applying discount on a Line Item.  Including discount_percentage or discount_amount applies to entire invoice.  The default type for a Line Item is a sales item if no type has been provided. When setting status to `void`, do not include any other fields in the request body.
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the language field: EN, FI, SV, ET, NO, and DA.
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: exact-online
          description: To configure the shipping address for invoices, it is recommended to update the customer resource. If there is a need to change this property, modifying the customer information is advised.
        - connector: xero
          description: For updating invoices, there are some limitations. Check out [here](https://developers.apideck.com/connectors/xero/docs/application_owner+oauth_credentials#1-limitations-and-rules-for-updating-xero-invoices)
        - connector: xero
          description: |
            Invoices in Xero can be tax inclusive, tax exclusive, or no tax. Set `tax_inclusive` to `true` (amounts include tax), `false` (amounts exclude tax), or `null` (no tax applied). When updating, changing `tax_inclusive` recalculates all line item amounts.
        - connector: quickbooks
          description: |
            When setting tax rates on line items, QuickBooks requires valid tax codes. The `tax_rate.id` must reference an existing tax code from the tax-rates endpoint. QuickBooks automatically calculates tax amounts based on the tax code's rate.
        - connector: freshbooks
          description: |
            The status field can be set to either "submitted" or "draft". The other available statuses are set by the Freshbooks API and cannot be updated manually. The due_date and invoice_date fields are required for the due date to be updated.
        - connector: zoho-books
          description: |
            The allowed values for the status field are "draft", "submitted", and "void" when using the update method.
            Please ensure that status updates are sent separately from other invoice updates.
        - connector: netsuite
          description: Netsuite only supports one tracking category at a time so only the first item in the tracking_categories list will be used.
        - connector: sage-business-cloud-accounting
          description: |
            To fetch service items, you must include filter[type]=service in your request parameters
        - connector: workday
          description: |
            It is required to provide tracking_categories.id in the line items, which corresponds to the worktag/cost_center_id in Workday. It is required to provide the item.id in the line items. Workday only supports `sales_item` and `service` types for line items and this is required.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice'
      responses:
        '200':
          $ref: '#/components/responses/UpdateInvoiceResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            invoice:
              display_id: '123456'
              type: service
              number: OIT00546
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              invoice_date: '2020-09-30'
              due_date: '2020-09-30'
              terms: Net 30 days
              terms_id: '12345'
              po_number: '90000117'
              reference: INV-2024-001
              status: draft
              invoice_sent: true
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 27500
              total_tax: 2500
              tax_code: '1234'
              discount_percentage: 5.5
              discount_amount: 25
              total: 27500
              balance: 27500
              deposit: 0
              customer_memo: Thank you for your business and have a great day!
              tracking_category:
                id: '123456'
                name: New York
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              template_id: '123456'
              source_document_url: https://www.invoicesolution.com/invoice/123456
              payment_allocations:
                - id: '123456'
                  allocated_amount: 1000
                  date: '2020-09-30T07:43:32.000Z'
              payment_method: cash
              channel: email
              language: EN
              accounting_by_row: false
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Invoices
      operationId: invoicesDelete
      summary: Delete Invoice
      description: Delete Invoice
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            Delete will set the invoice to inactive and will soft delete it, meaning it will stop appearing in the list API call. However, it can still be found via the get by id call.
      responses:
        '200':
          $ref: '#/components/responses/DeleteInvoiceResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/ledger-accounts:
    get:
      tags:
        - Ledger Accounts
      operationId: ledgerAccountsAll
      summary: List Ledger Accounts
      description: List Ledger Accounts
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/ledgerAccountsFilter'
        - $ref: '#/components/parameters/ledgerAccountsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: clearbooks-uk
          description: Clearbooks does not support setting the pagination size.
      responses:
        '200':
          $ref: '#/components/responses/GetLedgerAccountsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Ledger Accounts
      operationId: ledgerAccountsAdd
      summary: Create Ledger Account
      description: Create Ledger Account
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The `currency` field is supported only when Multi-Currency is enabled in NetSuite. It applies mainly to Bank and Credit Card accounts and becomes read-only after creation.
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LedgerAccount'
      responses:
        '201':
          $ref: '#/components/responses/CreateLedgerAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            ledgerAccount:
              display_id: 1-12345
              nominal_code: N091
              code: '453'
              classification: asset
              type: bank
              sub_type: CHECKING_ACCOUNT
              name: Bank account
              fully_qualified_name: Asset.Bank.Checking_Account
              description: Main checking account
              opening_balance: 75000
              current_balance: 20000
              currency: USD
              tax_type: NONE
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              level: 1
              active: true
              status: active
              header: true
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              parent_account:
                id: '12345'
                name: Bank Accounts
                display_id: 1-1100
              sub_account: false
              last_reconciliation_date: '2020-09-30'
              subsidiaries:
                - id: string
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/ledger-accounts/{id}:
    get:
      tags:
        - Ledger Accounts
      operationId: ledgerAccountsOne
      summary: Get Ledger Account
      description: Get Ledger Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetLedgerAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Ledger Accounts
      operationId: ledgerAccountsUpdate
      summary: Update Ledger Account
      description: Update Ledger Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: zoho-books
          description: |
            For ledger accounts, please update the "active" status separately from other updates.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LedgerAccount'
      responses:
        '200':
          $ref: '#/components/responses/UpdateLedgerAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            ledgerAccount:
              display_id: 1-12345
              nominal_code: N091
              code: '453'
              classification: asset
              type: bank
              sub_type: CHECKING_ACCOUNT
              name: Bank account
              fully_qualified_name: Asset.Bank.Checking_Account
              description: Main checking account
              opening_balance: 75000
              current_balance: 20000
              currency: USD
              tax_type: NONE
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              level: 1
              active: true
              status: active
              header: true
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              parent_account:
                id: '12345'
                name: Bank Accounts
                display_id: 1-1100
              sub_account: false
              last_reconciliation_date: '2020-09-30'
              subsidiaries:
                - id: string
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Ledger Accounts
      operationId: ledgerAccountsDelete
      summary: Delete Ledger Account
      description: Delete Ledger Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            This connector does not support deleting ledger accounts. Instead, it will update the ledger account to inactive.
      responses:
        '200':
          $ref: '#/components/responses/DeleteLedgerAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/invoice-items:
    get:
      tags:
        - Invoice Items
      operationId: invoiceItemsAll
      summary: List Invoice Items
      description: List Invoice Items
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/invoiceItemsFilter'
        - $ref: '#/components/parameters/invoiceItemsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: freeagent
          description: |
            We use **price list items** from FreeAgent to support invoice items. 
            To access stock items, please use the [Proxy API](https://developers.apideck.com/apis/proxy/reference).

            **Related resources:**
            - [Price List Items](https://dev.freeagent.com/docs/price_list_items)
            - [Stock Items](https://dev.freeagent.com/docs/stock_items) 
            - [Stock Items via Proxy API](https://developers.apideck.com/apis/proxy/reference)
        - connector: myob-acumatica
          description: |
            The Apideck service type is used for MYOB Acumatica non-stock items, and inventory is used for stock items.
        - connector: acumatica
          description: |
            The Apideck service type is used for Acumatica non-stock items, and inventory is used for stock items.
        - connector: workday
          description: |
            It is required to provide `transaction_type` filter in the request parameters. If `transaction_type` is `purchase`, purchase-items will be returned. If `transaction_type` is `sale`, sales-items will be returned.
      responses:
        '200':
          $ref: '#/components/responses/GetInvoiceItemsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Invoice Items
      operationId: invoiceItemsAdd
      summary: Create Invoice Item
      description: Create Invoice Item
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            The `taxable` field is applicable to US companies only and should be sent in the request body if your QuickBooks account is in the US region.
        - connector: freeagent
          description: |
            We use **price list items** from FreeAgent to support invoice items. 
            To access stock items, please use the [Proxy API](https://developers.apideck.com/apis/proxy/reference).

            **Related resources:**
            - [Price List Items](https://dev.freeagent.com/docs/price_list_items)
            - [Stock Items](https://dev.freeagent.com/docs/stock_items) 
            - [Stock Items via Proxy API](https://developers.apideck.com/apis/proxy/reference)
        - connector: workday
          description: |
            It is required to provide `sold` and `purchased` fields in the request body. If `sold` is true, sales-item will be created. If `purchased` is true, purchase-item will be created.
        - connector: acumatica
          description: |
            For `sales_details.tax_rate.id`, you must provide the Tax Category ID from the Acumatica not from our tax rates resource.
        - connector: myob-acumatica
          description: |
            For `sales_details.tax_rate.id`, you must provide the Tax Category ID from the MYOB Acumatica not from our tax rates resource.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceItem'
      responses:
        '201':
          $ref: '#/components/responses/CreateInvoiceItemResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            invoiceItem:
              name: Model Y
              description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
              display_id: '12345'
              code: 120-C
              sold: true
              purchased: true
              tracked: true
              taxable: true
              inventory_date: '2020-10-30'
              type: inventory
              sales_details:
                unit_price: 27500.5
                unit_of_measure: pc.
                tax_inclusive: true
                tax_rate:
                  id: '123456'
                  code: N-T
                  rate: 10
              purchase_details:
                unit_price: 27500.5
                unit_of_measure: pc.
                tax_inclusive: true
                tax_rate:
                  id: '123456'
                  code: N-T
                  rate: 10
              quantity: 1
              unit_price: 27500.5
              currency: USD
              asset_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              income_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              expense_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              tracking_category:
                id: '123456'
                name: New York
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              active: true
              department_id: '12345'
              location_id: '12345'
              subsidiary_id: '12345'
              category_id: '12345'
              tax_schedule_id: '123456'
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/invoice-items/{id}:
    get:
      tags:
        - Invoice Items
      operationId: invoiceItemsOne
      summary: Get Invoice Item
      description: Get Invoice Item
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/invoiceItemFilter'
      x-apideck-gotchas:
        - connector: sage-business-cloud-accounting
          description: |
            To fetch service items, you must include filter[type]=service in your request parameters
        - connector: freeagent
          description: |
            We use **price list items** from FreeAgent to support invoice items. 
            To access stock items, please use the [Proxy API](https://developers.apideck.com/apis/proxy/reference).

            **Related resources:**
            - [Price List Items](https://dev.freeagent.com/docs/price_list_items)
            - [Stock Items](https://dev.freeagent.com/docs/stock_items) 
            - [Stock Items via Proxy API](https://developers.apideck.com/apis/proxy/reference)
        - connector: workday
          description: |
            It is required to provide `transaction_type` filter in the request parameters. If `transaction_type` is `purchase`, purchase-item will be returned. If `transaction_type` is `sale`, sales-item will be returned.
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetInvoiceItemResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Invoice Items
      operationId: invoiceItemsUpdate
      summary: Update Invoice Item
      description: Update Invoice Item
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            The `taxable` field is applicable to US companies only and should be sent in the request body if your QuickBooks account is in the US region.
        - connector: zoho-books
          description: |
            Please ensure that status updates are sent separately from other invoice item updates.
        - connector: workday
          description: |
            It is required to provide `sold` and `purchased` fields in the request body. If `sold` is true, sales-item will be created. If `purchased` is true, purchase-item will be created.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceItem'
      responses:
        '200':
          $ref: '#/components/responses/UpdateInvoiceItemResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            invoiceItem:
              name: Model Y
              description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
              display_id: '12345'
              code: 120-C
              sold: true
              purchased: true
              tracked: true
              taxable: true
              inventory_date: '2020-10-30'
              type: inventory
              sales_details:
                unit_price: 27500.5
                unit_of_measure: pc.
                tax_inclusive: true
                tax_rate:
                  id: '123456'
                  code: N-T
                  rate: 10
              purchase_details:
                unit_price: 27500.5
                unit_of_measure: pc.
                tax_inclusive: true
                tax_rate:
                  id: '123456'
                  code: N-T
                  rate: 10
              quantity: 1
              unit_price: 27500.5
              currency: USD
              asset_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              income_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              expense_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              tracking_category:
                id: '123456'
                name: New York
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              active: true
              department_id: '12345'
              location_id: '12345'
              subsidiary_id: '12345'
              category_id: '12345'
              tax_schedule_id: '123456'
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Invoice Items
      operationId: invoiceItemsDelete
      summary: Delete Invoice Item
      description: Delete Invoice Item
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            Delete will set the invoice item to inactive and will soft delete it, meaning it will stop appearing in the list API call. However, it can still be found via the get by id call.
      responses:
        '200':
          $ref: '#/components/responses/DeleteInvoiceItemResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/credit-notes:
    get:
      tags:
        - Credit Notes
      operationId: creditNotesAll
      summary: List Credit Notes
      description: List Credit Notes
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/creditNotesFilter'
        - $ref: '#/components/parameters/creditNotesSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: afas
          description: |
            AFAS Profit derives credit notes from `Profit_SalesorderLines` by filtering rows with a negative `AmtTotal` or a credit-style `Ordersoort` (e.g. `CR`). Tenants that store credit notes in a separate journal (and not as negative sales-order lines) will return an empty list — set the `credit_notes_connector` setting to a tenant-specific GetConnector to override.

            The `limit` parameter may return fewer credit notes than specified. AFAS returns flat sales-order line rows which are grouped by `OrderNumber` into complete credit notes. `limit=N` caps the raw row count, not the grouped credit-note count.
        - connector: clearbooks-uk
          description: Clearbooks does not support setting the pagination size.
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: sage-business-cloud-accounting
          description: |
            The `allocations` field is not returned in responses. To retrieve allocation details, use the proxy API to call `/contact_allocations?contact_id={customer_id}`.
      responses:
        '200':
          $ref: '#/components/responses/GetCreditNotesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Credit Notes
      operationId: creditNotesAdd
      summary: Create Credit Note
      description: Create Credit Note
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: For adding invoice allocations, use the proxy API. [Know more](https://developers.apideck.com/connectors/xero/docs/application_owner+oauth_credentials#2-curl-requests-for-adding-and-removing-allocations-from-xero-credit-note)
        - connector: zoho-books
          description: |
            By default, the status of the bill will be set to "authorised".
        - connector: netsuite
          description: Netsuite only supports one tracking category at a time so only the first item in the tracking_categories list will be used.
        - connector: sage-business-cloud-accounting
          description: |
            Pass allocations in the `allocations` array. The first allocation is supported on all plans; additional allocations (2+) require higher than "Start" plan.
            The `allocations` field is not returned in responses. To retrieve allocation details, use the proxy API to call `/contact_allocations?contact_id={customer_id}`.
        - connector: access-financials
          description: |
            Access Financials creates credit notes as live/posted transactions immediately. Live transactions cannot be updated, so to correct a credit note you must delete it and create a new one.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditNote'
      responses:
        '201':
          $ref: '#/components/responses/CreateCreditNoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            creditNote:
              number: OIT00546
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 27500
              total_amount: 49.99
              total_tax: 2500
              tax_code: '1234'
              balance: 27500
              remaining_credit: 27500
              status: authorised
              reference: '123456'
              date_issued: '2021-05-01T12:00:00.000Z'
              date_paid: '2021-05-01T12:00:00.000Z'
              type: accounts_receivable_credit
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              allocations:
                - id: '123456'
                  type: invoice
                  amount: 49.99
                  allocation_id: '123456'
              note: Some notes about this credit note
              terms: Some terms about this credit note
              terms_id: '12345'
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/credit-notes/{id}:
    get:
      tags:
        - Credit Notes
      operationId: creditNotesOne
      summary: Get Credit Note
      description: Get Credit Note
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: sage-business-cloud-accounting
          description: |
            The `allocations` field is not returned in responses. To retrieve allocation details, use the proxy API to call `/contact_allocations?contact_id={customer_id}`.
      responses:
        '200':
          $ref: '#/components/responses/GetCreditNoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Credit Notes
      operationId: creditNotesUpdate
      summary: Update Credit Note
      description: Update Credit Note
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            - Netsuite doesn't support voiding credit notes via API. Options: 1) Remove allocations and delete, or 2) Create a reversing invoice for the same amount.
        - connector: xero
          description: |
            - Authorised Credit Note can only be updated to voided status and cannot be deleted once authorised.
            - Any invoice allocation and payment must be deleted before updating the authorised Credit Note to status voided.
            - To delete payments, use the payment ID from the raw data and delete it using the Delete Payment endpoint.
            - For adding and removing invoice allocations, use the proxy API. [Know more](https://developers.apideck.com/connectors/xero/docs/application_owner+oauth_credentials#2-curl-requests-for-adding-and-removing-allocations-from-xero-credit-note)
        - connector: xero
          description: Credit notes in xero can be tax inclusive, tax exclusive or no tax. The tax_inclusive field should be set to true, false or null if the credit note is tax inclusive, tax exclusive or no tax.
        - connector: zoho-books
          description: |
            Allowed values for the status are "draft", "authorised", and "voided" when using the update method.
            Please send status updates separately from other updates for Credit Notes.
        - connector: netsuite
          description: Netsuite only supports one tracking category at a time so only the first item in the tracking_categories list will be used.
        - connector: sage-business-cloud-accounting
          description: |
            Allocations cannot be modified after credit note creation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditNote'
      responses:
        '200':
          $ref: '#/components/responses/UpdateCreditNoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            creditNote:
              number: OIT00546
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 27500
              total_amount: 49.99
              total_tax: 2500
              tax_code: '1234'
              balance: 27500
              remaining_credit: 27500
              status: authorised
              reference: '123456'
              date_issued: '2021-05-01T12:00:00.000Z'
              date_paid: '2021-05-01T12:00:00.000Z'
              type: accounts_receivable_credit
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              allocations:
                - id: '123456'
                  type: invoice
                  amount: 49.99
                  allocation_id: '123456'
              note: Some notes about this credit note
              terms: Some terms about this credit note
              terms_id: '12345'
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Credit Notes
      operationId: creditNotesDelete
      summary: Delete Credit Note
      description: Delete Credit Note
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: |
            Xero will only allow deleting a Credit Note if it is in draft status.
            Credit notes with "authorised" status cannot be deleted directly. Instead:
            - If the credit note is empty (i.e., has no invoice allocations and payments), its status can be updated to "voided" by update Credit Note endpoint.
            - If the credit note has invoice allocations and payments, these must be removed first. Once all invoice allocations and payments are deleted, the credit note's status can be updated to "Voided" by update Credit Note endpoint.
              [Know more](https://developers.apideck.com/connectors/xero/docs/application_owner+oauth_credentials#2-curl-requests-for-adding-and-removing-allocations-from-xero-credit-note)
        - connector: freshbooks
          description: |
            Delete will set the credit note to inactive and will soft delete it, meaning it will stop appearing in the list API call. However, it can still be found via the get by id call.
      responses:
        '200':
          $ref: '#/components/responses/DeleteCreditNoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/customers:
    get:
      tags:
        - Customers
      operationId: customersAll
      summary: List Customers
      description: List Customers
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/customersFilter'
        - $ref: '#/components/parameters/customersSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: clearbooks-uk
          description: Clearbooks does not support setting the pagination size.
        - connector: xero
          description: |
            In Xero, contacts are not strictly separated into customers or suppliers until linked to a transaction. Apideck's approach is to return customers as `IsCustomer=true||IsSupplier=false` and suppliers as `IsSupplier=true||IsCustomer=false`. If you need other cases, use pass-through, e.g. `?pass_through[where]=IsCustomer=false AND IsSupplier=false` for uncategorized contacts. See the [Pass-through guide](https://developers.apideck.com/guides/pass-through) for more details.
        - connector: freeagent
          description: |
            In FreeAgent, newly created customers will not appear in customer list responses until an invoice has been assigned to them. This is because FreeAgent only classifies contacts as customers once they have associated invoices. See [Set up a contact as a customer or a supplier](https://support.freeagent.com/hc/en-gb/articles/115001217850-Set-up-a-contact-as-a-customer-or-a-supplier) for more details.
        - connector: wafeq
          description: |
            Wafeq does not separate customers and suppliers as distinct API resources — both share `/v1/contacts/`. The unified `customers` resource sends `relationship[]=customer` to filter, and `suppliers` sends `relationship[]=supplier`. However, Wafeq's `relationship` field is internal and is NOT settable via the API on contact create/update — it is populated by Wafeq based on UI classification or transaction history. Newly-created contacts and contacts with no transactions will appear in BOTH the customers and suppliers lists until Wafeq tags them. To enforce strict customer/supplier separation, manage contact classification in the Wafeq UI.
      responses:
        '200':
          $ref: '#/components/responses/GetCustomersResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Customers
      operationId: customersAdd
      summary: Create Customer
      description: Create Customer
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_DEBIT, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: quickbooks
          description: QuickBooks supports only billing and shipping addresses. Therefore, when creating addresses, it is required to specify the type as 'billing' or 'shipping' in the address object within the addresses array.
        - connector: freshbooks
          description: |
            Freshbooks API set status to active by default for new customers. To change the status, you can use the Update Customer endpoint.
        - connector: freeagent
          description: |
            You can create customer contacts, but they will not be visible in customer list responses until an invoice is assigned to them. FreeAgent only classifies contacts as customers after they have associated transactions. See [Set up a contact as a customer or a supplier](https://support.freeagent.com/hc/en-gb/articles/115001217850-Set-up-a-contact-as-a-customer-or-a-supplier) for more information.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
      responses:
        '201':
          $ref: '#/components/responses/CreateCustomerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            customer:
              display_id: EMP00101
              display_name: Windsurf Shop
              company_name: SpaceX
              company_id: '12345'
              customer_category: Insurance
              title: CEO
              first_name: Elon
              middle_name: D.
              last_name: Musk
              suffix: Jr.
              individual: true
              project: false
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              phone_numbers:
                - id: '12345'
                  country_code: '1'
                  area_code: '323'
                  number: 111-111-1111
                  extension: '105'
                  type: primary
              emails:
                - id: '123'
                  email: elon@musk.com
                  type: primary
              websites:
                - id: '12345'
                  url: http://example.com
                  type: primary
              bank_accounts:
                - bank_name: Chase Bank
                  account_number: '123465'
                  account_name: Main Operating Account
                  account_type: credit_card
                  iban: GB33BUKB20201555555555
                  bic: CHASUS33
                  routing_number: '021000021'
                  bsb_number: 062-001
                  branch_identifier: '001'
                  bank_code: BNH
                  currency: USD
                  country: US
              notes: Some notes about this customer
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tax_number: US123945459
              taxable: true
              currency: USD
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              parent:
                id: '12345'
                name: Windsurf Shop
              status: active
              payment_method: cash
              terms: Net 30 days
              terms_id: '12345'
              channel: email
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/customers/{id}:
    get:
      tags:
        - Customers
      operationId: customersOne
      summary: Get Customer
      description: Get Customer
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetCustomerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Customers
      operationId: customersUpdate
      summary: Update Customer
      description: Update Customer
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_DEBIT, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: quickbooks
          description: QuickBooks supports only billing and shipping addresses. Therefore, when creating or updating addresses, it is required to specify the type as 'billing' or 'shipping' in the address object within the addresses array.
        - connector: freshbooks
          description: |
            The status field can be updated to either "active" or "archived".
        - connector: zoho-books
          description: |
            The status field can be updated to either "active" or "inactive".
            Please send status updates separately from other updates for the customer.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
      responses:
        '200':
          $ref: '#/components/responses/UpdateCustomerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            customer:
              display_id: EMP00101
              display_name: Windsurf Shop
              company_name: SpaceX
              company_id: '12345'
              customer_category: Insurance
              title: CEO
              first_name: Elon
              middle_name: D.
              last_name: Musk
              suffix: Jr.
              individual: true
              project: false
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              phone_numbers:
                - id: '12345'
                  country_code: '1'
                  area_code: '323'
                  number: 111-111-1111
                  extension: '105'
                  type: primary
              emails:
                - id: '123'
                  email: elon@musk.com
                  type: primary
              websites:
                - id: '12345'
                  url: http://example.com
                  type: primary
              bank_accounts:
                - bank_name: Chase Bank
                  account_number: '123465'
                  account_name: Main Operating Account
                  account_type: credit_card
                  iban: GB33BUKB20201555555555
                  bic: CHASUS33
                  routing_number: '021000021'
                  bsb_number: 062-001
                  branch_identifier: '001'
                  bank_code: BNH
                  currency: USD
                  country: US
              notes: Some notes about this customer
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tax_number: US123945459
              taxable: true
              currency: USD
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              parent:
                id: '12345'
                name: Windsurf Shop
              status: active
              payment_method: cash
              terms: Net 30 days
              terms_id: '12345'
              channel: email
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Customers
      operationId: customersDelete
      summary: Delete Customer
      description: Delete Customer
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            Delete will set the customer to inactive and will soft delete it, meaning it will stop appearing in the list API call. However, it can still be found via the get by id call.
      responses:
        '200':
          $ref: '#/components/responses/DeleteCustomerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/suppliers:
    get:
      tags:
        - Suppliers
      operationId: suppliersAll
      summary: List Suppliers
      description: List Suppliers
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/suppliersFilter'
        - $ref: '#/components/parameters/suppliersSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: clearbooks-uk
          description: Clearbooks does not support setting the pagination size.
        - connector: wafeq
          description: |
            Wafeq does not separate customers and suppliers as distinct API resources — both share `/v1/contacts/`. The unified `suppliers` resource sends `relationship[]=supplier` to filter. However, Wafeq's `relationship` field is internal and is NOT settable via the API on contact create/update — it is populated by Wafeq based on UI classification or transaction history. Newly-created contacts and contacts with no transactions will appear in BOTH the customers and suppliers lists until Wafeq tags them. To enforce strict customer/supplier separation, manage contact classification in the Wafeq UI.
        - connector: procountor-fi
          description: |
            Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_DEBIT, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
            Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: xero
          description: |
            In Xero, contacts are not strictly separated into customers or suppliers until linked to a transaction. Apideck's approach is to return suppliers as `IsSupplier=true||IsCustomer=false` and customers as `IsCustomer=true||IsSupplier=false`. If you need other cases, use pass-through, e.g. `?pass_through[where]=IsCustomer=false AND IsSupplier=false` for uncategorized contacts. See the [Pass-through guide](https://developers.apideck.com/guides/pass-through) for more details.
      responses:
        '200':
          $ref: '#/components/responses/GetSuppliersResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Suppliers
      operationId: suppliersAdd
      summary: Create Supplier
      description: Create Supplier
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Supplier'
      x-apideck-gotchas:
        - connector: quickbooks
          description: QuickBooks only supports a single billing address. Therefore, the first item in the addresses array will always be mapped as the billing address, regardless of its original type.
        - connector: microsoft-dynamics-365-business-central
          description: |
            If you encounter a '400 Bad Request' error indicating "Control 'fieldName' is read-only" it means the 'editable' property for this field in Microsoft Dynamics 365 Business Central is currently set to false. To resolve this issue and make the field writable, simply update the 'editable' property to true in Microsoft Dynamics 365 Business Central.
        - connector: freshbooks
          description: |
            Freshbooks API set status to active by default for new suppliers. To change the status, you can use the Update Supplier endpoint.
        - connector: workday
          description: |
            In Workday, the supplier_category, display_name, addresses, emails, company_id, currency, terms, and payment_method fields are required to create a supplier. display_name and company_id should be same.
      responses:
        '201':
          $ref: '#/components/responses/CreateSupplierResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            supplier:
              display_id: EMP00101
              display_name: Windsurf Shop
              company_name: SpaceX
              company_id: '12345'
              supplier_category: Insurance
              title: CEO
              first_name: Elon
              middle_name: D.
              last_name: Musk
              suffix: Jr.
              individual: true
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              phone_numbers:
                - id: '12345'
                  country_code: '1'
                  area_code: '323'
                  number: 111-111-1111
                  extension: '105'
                  type: primary
              emails:
                - id: '123'
                  email: elon@musk.com
                  type: primary
              websites:
                - id: '12345'
                  url: http://example.com
                  type: primary
              bank_accounts:
                - bank_name: Chase Bank
                  account_number: '123465'
                  account_name: Main Operating Account
                  account_type: credit_card
                  iban: GB33BUKB20201555555555
                  bic: CHASUS33
                  routing_number: '021000021'
                  bsb_number: 062-001
                  branch_identifier: '001'
                  bank_code: BNH
                  currency: USD
                  country: US
              notes: Some notes about this supplier
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tax_number: US123945459
              taxable: true
              currency: USD
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              status: active
              payment_method: cash
              terms: Net 30 days
              terms_id: '12345'
              channel: email
              issued_method: Email
              issued_email: john.doe@example.com
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              tax_details:
                - type: GST on Purchases
                  number: '123456'
                  is_transaction_tax: true
                  is_primary_tax: true
              tax_status_details:
                - country: US
                  transaction_tax_status: taxable
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              subsidiary_id: '12345'
              integration_system_id: '12345'
  /accounting/suppliers/{id}:
    get:
      tags:
        - Suppliers
      operationId: suppliersOne
      summary: Get Supplier
      description: Get Supplier
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetSupplierResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Suppliers
      operationId: suppliersUpdate
      summary: Update Supplier
      description: Update Supplier
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_DEBIT, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: quickbooks
          description: QuickBooks only supports a single billing address. Therefore, the first item in the addresses array will always be mapped as the billing address, regardless of its original type.
        - connector: freshbooks
          description: |
            The status field can be updated to either "active" or "archived".
        - connector: zoho-books
          description: |
            The status field can be updated to either "active" or "inactive".
            Please send status updates separately from other updates for the supplier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Supplier'
      responses:
        '200':
          $ref: '#/components/responses/UpdateSupplierResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            supplier:
              display_id: EMP00101
              display_name: Windsurf Shop
              company_name: SpaceX
              company_id: '12345'
              supplier_category: Insurance
              title: CEO
              first_name: Elon
              middle_name: D.
              last_name: Musk
              suffix: Jr.
              individual: true
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              phone_numbers:
                - id: '12345'
                  country_code: '1'
                  area_code: '323'
                  number: 111-111-1111
                  extension: '105'
                  type: primary
              emails:
                - id: '123'
                  email: elon@musk.com
                  type: primary
              websites:
                - id: '12345'
                  url: http://example.com
                  type: primary
              bank_accounts:
                - bank_name: Chase Bank
                  account_number: '123465'
                  account_name: Main Operating Account
                  account_type: credit_card
                  iban: GB33BUKB20201555555555
                  bic: CHASUS33
                  routing_number: '021000021'
                  bsb_number: 062-001
                  branch_identifier: '001'
                  bank_code: BNH
                  currency: USD
                  country: US
              notes: Some notes about this supplier
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tax_number: US123945459
              taxable: true
              currency: USD
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              status: active
              payment_method: cash
              terms: Net 30 days
              terms_id: '12345'
              channel: email
              issued_method: Email
              issued_email: john.doe@example.com
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              tax_details:
                - type: GST on Purchases
                  number: '123456'
                  is_transaction_tax: true
                  is_primary_tax: true
              tax_status_details:
                - country: US
                  transaction_tax_status: taxable
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              subsidiary_id: '12345'
              integration_system_id: '12345'
    delete:
      tags:
        - Suppliers
      operationId: suppliersDelete
      summary: Delete Supplier
      description: Delete Supplier
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            Delete will set the supplier to inactive and will soft delete it, meaning it will stop appearing in the list API call.
      responses:
        '200':
          $ref: '#/components/responses/DeleteSupplierResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/payments:
    get:
      tags:
        - Payments
      operationId: paymentsAll
      summary: List Payments
      description: List Payments
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/paymentsFilter'
        - $ref: '#/components/parameters/paymentsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: kashflow
          description: Kashflow only allows to retrieve payments by invoice, so in order to use this endpoint the filter[invoice_number] parameter is required.
        - connector: sage-business-cloud-accounting
          description: |
            Payments are retrieved using the `transaction_type_id` parameter which defaults to `CUSTOMER_RECEIPT`. Use the `type` filter to retrieve other payment transaction types.
      responses:
        '200':
          $ref: '#/components/responses/GetPaymentsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Payments
      operationId: paymentsAdd
      summary: Create Payment
      description: Create Payment
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Payment'
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The number property could be used to override the Netsuite tranId property.
        - connector: xero
          description: |
            Xero supports creating payments against multiple allocation types in a single request. However, the response will provide the ID of the first payment only. To access all payment IDs, inspect the raw data.
        - connector: quickbooks
          description: |
            Payment allocations in QuickBooks are processed asynchronously. While the allocations are included in the request, they may not appear in the immediate response. The allocations will be applied and become visible in subsequent list or get calls.
        - connector: access-financials
          description: |
            Access Financials creates payments as live/posted transactions immediately. Live transactions cannot be updated, so to correct a payment you must delete it and create a new one.
        - connector: wafeq
          description: |
            Wafeq splits payment allocations by document type into separate vendor fields: `accounts_receivable` payments populate `invoice_payments[]`, `accounts_payable` payments populate `bill_payments[]`. Wafeq requires `amount_to_pcy` (amount in primary currency) on each allocation; Apideck mirrors `amount` for single-currency cases. The target invoice or bill must be finalized before a payment can attach — drafts return `403 payment_locked`. To finalize, PATCH the document with the appropriate non-draft status (invoices/credit-notes accept `FINALIZED` or `SENT`, bills accept `AUTHORIZED`); these map to the unified `authorised` status. The bank account's currency must match the payment currency (Wafeq does not auto-convert).
      responses:
        '201':
          $ref: '#/components/responses/CreatePaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            payment:
              currency: USD
              currency_rate: 0.69
              total_amount: 49.99
              reference: '123456'
              payment_method: cash
              payment_method_reference: '123456'
              payment_method_id: '12345'
              accounts_receivable_account_type: Account
              accounts_receivable_account_id: '123456'
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              transaction_date: '2021-05-01T12:00:00.000Z'
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              supplier:
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              reconciled: true
              status: authorised
              type: accounts_receivable
              allocations:
                - id: '123456'
                  type: invoice
                  amount: 49.99
                  allocation_id: '123456'
              note: Some notes about this transaction
              number: '123456'
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              display_id: '123456'
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/payments/{id}:
    get:
      tags:
        - Payments
      operationId: paymentsOne
      summary: Get Payment
      description: Get Payment
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetPaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Payments
      operationId: paymentsUpdate
      summary: Update Payment
      description: Update Payment
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: |
            Xero doesn't support updating payments. To update a payment, you need to delete the existing payment and create a new one.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Payment'
      responses:
        '200':
          $ref: '#/components/responses/UpdatePaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            payment:
              currency: USD
              currency_rate: 0.69
              total_amount: 49.99
              reference: '123456'
              payment_method: cash
              payment_method_reference: '123456'
              payment_method_id: '12345'
              accounts_receivable_account_type: Account
              accounts_receivable_account_id: '123456'
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              transaction_date: '2021-05-01T12:00:00.000Z'
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              supplier:
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              reconciled: true
              status: authorised
              type: accounts_receivable
              allocations:
                - id: '123456'
                  type: invoice
                  amount: 49.99
                  allocation_id: '123456'
              note: Some notes about this transaction
              number: '123456'
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              display_id: '123456'
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Payments
      operationId: paymentsDelete
      summary: Delete Payment
      description: Delete Payment
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            Delete will set the payment to inactive and will soft delete it, meaning it will stop appearing in the list API call. However, it can still be found via the get by id call.
      responses:
        '200':
          $ref: '#/components/responses/DeletePaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/refunds:
    get:
      tags:
        - Refunds
      operationId: refundsAll
      summary: List Refunds
      description: List Refunds
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/refundsFilter'
        - $ref: '#/components/parameters/refundsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            tax_inclusive only applies to UK, AU, IN, and CA editions. US companies ignore this field silently.
      responses:
        '200':
          $ref: '#/components/responses/GetRefundsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Refunds
      operationId: refundsAdd
      summary: Create Refund
      description: Create Refund
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            tax_inclusive only applies to UK, AU, IN, and CA editions. US companies ignore this field silently. payment_method_id is required to set the payment method. Provide the ID of a payment method record configured in QuickBooks. total_amount is required on each line item. If not provided, it is computed from quantity * unit_price. tracking_categories behavior depends on company settings. "One to entire transaction" uses top-level tracking_categories. "One to each row" requires tracking_categories on each line item.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Refund'
      responses:
        '201':
          $ref: '#/components/responses/CreateRefundResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            refund:
              number: RF-00001
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              company_id: '12345'
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 250
              total_amount: 49.99
              total_tax: 25
              refund_date: '2021-05-01T12:00:00.000Z'
              status: paid
              type: refund_receipt
              payment_method: cash
              payment_method_reference: '123456'
              payment_method_id: '12345'
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              allocations:
                - id: '123456'
                  type: invoice
                  amount: 49.99
                  allocation_id: '123456'
              tax_code: '1234'
              discount_percentage: 5.5
              discount_amount: 25
              note: Refund for returned items
              customer_memo: Thank you for your business and have a great day!
              reference: REF-123456
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              department:
                display_id: '123456'
                name: Acme Inc.
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/refunds/{id}:
    get:
      tags:
        - Refunds
      operationId: refundsOne
      summary: Get Refund
      description: Get Refund
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            tax_inclusive only applies to UK, AU, IN, and CA editions. US companies will not have this field in responses. payment_method returns the name of the payment method record, not the payment type category.
      responses:
        '200':
          $ref: '#/components/responses/GetRefundResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Refunds
      operationId: refundsUpdate
      summary: Update Refund
      description: Update Refund
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            row_version is required for updates. tracking_categories behavior depends on company settings. "One to each row" requires tracking_categories on each line item.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Refund'
      responses:
        '200':
          $ref: '#/components/responses/UpdateRefundResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            refund:
              number: RF-00001
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              company_id: '12345'
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 250
              total_amount: 49.99
              total_tax: 25
              refund_date: '2021-05-01T12:00:00.000Z'
              status: paid
              type: refund_receipt
              payment_method: cash
              payment_method_reference: '123456'
              payment_method_id: '12345'
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              allocations:
                - id: '123456'
                  type: invoice
                  amount: 49.99
                  allocation_id: '123456'
              tax_code: '1234'
              discount_percentage: 5.5
              discount_amount: 25
              note: Refund for returned items
              customer_memo: Thank you for your business and have a great day!
              reference: REF-123456
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              department:
                display_id: '123456'
                name: Acme Inc.
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Refunds
      operationId: refundsDelete
      summary: Delete Refund
      description: Delete Refund
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteRefundResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/company-info:
    get:
      tags:
        - Company Info
      operationId: companyInfoOne
      summary: Get company info
      description: Get company info
      x-apideck-gotchas:
        - connector: campfire
          description: |
            Campfire does not have a dedicated company info endpoint. This operation returns the first
            entity (subsidiary) from the entities list. For multi-entity accounts, use the subsidiaries
            endpoint to get all entities.
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetCompanyInfoResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /accounting/companies:
    get:
      tags:
        - Companies
      operationId: companiesAll
      summary: List companies
      description: List all companies accessible through the current connection. Only connectors that support multi-company access (x-apideck-supports-multi-company) will return a list of companies. Use the returned company ID in the x-apideck-company-id header to scope subsequent requests to a specific company.
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetCompaniesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /accounting/balance-sheet:
    get:
      tags:
        - Balance Sheet
      operationId: balanceSheetOne
      summary: Get BalanceSheet
      description: Get BalanceSheet
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/balanceSheetFilter'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: When using start and end date filters, QuickBooks requires both to be sent. However, the report only reflects the balance sheet situation as of the end date.
        - connector: netsuite
          description: |
            NetSuite date filtering resolves `filter[end_date]` to accounting period IDs via SuiteQL, then filters the SOAP request by periods up to that date. This requires the SuiteAnalytics Workbook permission for period resolution. If unavailable, returns all-time data as fallback. For Balance Sheet, only `filter[end_date]` is meaningful (point-in-time snapshot).
        - connector: rillet
          description: |
            Rillet's `/reports/balance-sheet` endpoint returns a point-in-time snapshot keyed by a single `as_of_date` parameter (required). The unified `filter[end_date]` is mapped to `as_of_date`, so pass it to retrieve the balance sheet as of that date. `filter[start_date]` is not applicable and is ignored — a balance sheet has no start date.
        - connector: datev-unternehmen-online
          description: |
            The balance sheet report's `end_date` is derived from the `fiscal_year_start` connection setting (start + 12 months - 1 day). Configure this setting to match your actual fiscal year start date (e.g. 2023-07-01 for a July–June fiscal year). If not set, defaults to December 31 of the current year. Date filtering via `filter[end_date]` is not supported.
      responses:
        '200':
          $ref: '#/components/responses/GetBalanceSheetResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /accounting/profit-and-loss:
    get:
      tags:
        - Profit and Loss
      operationId: profitAndLossOne
      summary: Get Profit and Loss
      description: Get Profit and Loss
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/profitAndLossFilter'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: sage-intacct
          description: |
            Sage Intacct's Profit and Loss report is structured around account groups.  To retrieve accurate data, all income statement accounts must be mapped to one  of the following categories: Revenue, Cost of Revenue, Operating Expense, or Other Expenses.  Any income statement accounts that are not mapped to one of these categories  will appear under the `uncategorized_accounts` property.
        - connector: freeagent
          description: |
            FreeAgent's Profit and Loss API has a date range limitation. The specified period must be **12 months or less, or contained within a single accounting year**. Periods that exceed 12 months and span multiple accounting years will return an error.
        - connector: netsuite
          description: |
            NetSuite date filtering resolves `filter[start_date]` and `filter[end_date]` to accounting period IDs via SuiteQL, then filters the SOAP request by those periods. This requires the SuiteAnalytics Workbook permission for period resolution. If the permission is unavailable, the report returns all-time data as a fallback. For best results, keep date ranges under 16 years (200 monthly periods).
      responses:
        '200':
          $ref: '#/components/responses/GetProfitAndLossResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /accounting/journal-entries:
    get:
      tags:
        - Journal Entries
      operationId: journalEntriesAll
      summary: List Journal Entries
      description: List Journal Entries
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/journalEntriesFilter'
        - $ref: '#/components/parameters/journalEntriesSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: xero
          description: |
            Xero has two resources: journals (entries from transactions like invoices, payments, or manual journals) and manual journals (user-created entries).
            Unify lists journal entries (xero journals) by default. To view draft journal entries (xero manual journals), use the filter `filter[status]=draft`.
            The exposed id depends on the journal entry status. For draft entries, the id corresponds to a manual journal. For posted entries, the id corresponds to a Journal.
            Xero returns 100 items per call, so the `limit` parameter is ignored.
        - connector: exact-online
          description: |
            Limit parameter for pagination is not supported for this resource.
        - connector: exact-online-nl
          description: |
            Limit parameter for pagination is not supported for this resource.
        - connector: exact-online-uk
          description: |
            Limit parameter for pagination is not supported for this resource.
      responses:
        '200':
          $ref: '#/components/responses/GetJournalEntriesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Journal Entries
      operationId: journalEntriesAdd
      summary: Create Journal Entry
      description: Create Journal Entry
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: procountor-fi
          description: |
            Procountor only accepts the following values for the tax_code field: SALES, PURCHASE.
        - connector: xero
          description: |
            Xero has two separate resources: journals (journal entries generated from any type of originating transaction such as invoices, payments, or manual journals) and manual journals (user-created entries).
            When a journal entry is created as draft, it is stored as a manual journal and does not yet become a journal. Once it is posted, or if it is created as posted from the beginning, it becomes a journal. In this case, when a draft manual journal is changed to posted, the id will change.
            Xero only supports `draft` and `posted` for the status field.
            For ledger accounts in journal lines, you can use either `ledger_account.id` (UUID) or `ledger_account.code`. If only the ID is provided, the code will be resolved automatically.
            Journal entries in xero can be tax inclusive, tax exclusive or no tax. The `tax_inclusive` field should be set to true, false or null if the journal entry is tax inclusive, tax exclusive or no tax.
        - connector: netsuite
          description: Netsuite only supports one tracking category at a time so only the first item in the tracking_categories list will be used.
        - connector: mrisoftware
          description: |
            MRI Software does not provide a proper ID for journal line items. Instead, each journal line item is identified by a combination of GLREFERENCE, PERIOD, and ITEM. These fields are mapped to unify with the properties number, accounting_period, and line_number, respectively. Additionally, MRI Software requires a GLSOURCE field, which is not supported by Unify. Therefore, it will be sent statically as "GL" (General Ledger).
        - connector: quickbooks
          description: |
            Quickbooks only supports one tracking category at a time so only the first item in the tracking_categories list will be used.
            Line-level tax fields (tax_rate, tax_amount, tax_type) on journal entries are only supported for non-US QuickBooks companies (UK, CA, AU, etc.). US-based QuickBooks companies silently discard all tax fields — the request succeeds but no tax data is persisted.
            For US companies that need to reflect tax in journal entries, add a separate line item posting the tax amount to a tax liability ledger account (e.g., "Sales Tax Payable"). This keeps the journal entry balanced in the general ledger, but will not populate QuickBooks Sales Tax reports — for that, use invoices or sales receipts instead.
            When line_items[].tax_type is not set, QuickBooks requires knowing whether the tax applies to a sales or purchase transaction. Unify infers this from line_items[].type: credit lines are treated as sales (TaxApplicableOn: Sales) and debit lines as purchases (TaxApplicableOn: Purchase). This covers the common case of sales summary journal entries. For atypical entries (e.g. a credit to an AP account, or a debit for a sales return), set tax_type explicitly on each line to override the default.
        - connector: sage-intacct
          description: |
            Sage Intacct only supports `draft` and `posted` status fields when updating a journal entry.
            If no status is provided then the default status is "draft".
            Only Journal Entries with `draft` status can be updated.
        - connector: workday
          description: |
            Status should be set to "draft" or "posted". Default status is "draft".
            Only Journal Entries with `draft` status can be updated.
            It is required to provide Cost_Center_Reference_ID as worktag in the line items, otherwise the status will automatically be set to "draft".
        - connector: microsoft-dynamics-365-business-central
          description: |
            Employee account type: journal entry lines can reference employees via the `employee` field (use `display_id` for the employee number, or `id` with a GUID which will be resolved automatically). Note: reading back the journal entry will NOT return the employee reference — employee lines are invisible in BC's API for draft entries, and resolve to a GL payable account when posted. Send `ledger_account: {}` alongside the `employee` field to satisfy schema validation.
        - connector: acumatica
          description: |
            Acumatica requires a separate Release action to transition a journal entry from Balanced to Posted.
            When `status: "posted"` is sent, Unify automatically calls the ReleaseJournalTransaction action after creating or updating the entry.
            Only `status: "posted"` is supported for state transitions. Other values (`draft`, `voided`, etc.) are not supported — the entry will be created or updated but will remain in Balanced state.
            Once a journal entry is Posted, it cannot be edited. Any attempt to update a Posted entry will be rejected by Acumatica with an error.
            If the release step fails after a successful create or update, the entry will exist in Acumatica in Balanced state and the API will return an error. The entry is not rolled back.
        - connector: myob-acumatica
          description: |
            MYOB Advanced (Acumatica) requires a separate Release action to transition a journal entry from Balanced to Posted.
            When `status: "posted"` is sent, Unify automatically calls the ReleaseJournalTransaction action after creating or updating the entry.
            Only `status: "posted"` is supported for state transitions. Other values (`draft`, `voided`, etc.) are not supported — the entry will be created or updated but will remain in Balanced state.
            Once a journal entry is Posted, it cannot be edited. Any attempt to update a Posted entry will be rejected by Acumatica with an error.
            If the release step fails after a successful create or update, the entry will exist in MYOB Advanced in Balanced state and the API will return an error. The entry is not rolled back.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JournalEntry'
      responses:
        '201':
          $ref: '#/components/responses/CreateJournalEntryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            journalEntry:
              display_id: '12345'
              title: 'Purchase Invoice-Inventory (USD): 2019/02/01 Batch Summary Entry'
              currency_rate: 0.69
              currency: USD
              company_id: '12345'
              line_items:
                - description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  tax_amount: 27500
                  sub_total: 27500
                  total_amount: 27500
                  type: debit
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tax_type: sales
                  tracking_category:
                    id: '123456'
                    name: New York
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  supplier:
                    id: '12345'
                    display_name: Windsurf Shop
                    address:
                      id: '123'
                      type: primary
                      string: 25 Spring Street, Blackburn, VIC 3130
                      name: HQ US
                      line1: Main street
                      line2: 'apt #'
                      line3: 'Suite #'
                      line4: delivery instructions
                      line5: 'Attention: Finance Dept'
                      street_number: '25'
                      city: San Francisco
                      state: CA
                      postal_code: '94104'
                      country: US
                      latitude: '40.759211'
                      longitude: '-73.984638'
                      county: Santa Clara
                      contact_name: Elon Musk
                      salutation: Mr
                      phone_number: 111-111-1111
                      fax: 122-111-1111
                      email: elon@musk.com
                      website: https://elonmusk.com
                      notes: Address notes or delivery instructions.
                      row_version: 1-12345
                  employee:
                    id: '12345'
                    display_id: EH
                    display_name: Ester Henderson
                  department_id: '12345'
                  location_id: '12345'
                  line_number: 1
                  worktags:
                    - id: '123456'
                      value: New York
                - description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  tax_amount: 27500
                  sub_total: 27500
                  total_amount: 27500
                  type: debit
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tax_type: sales
                  tracking_category:
                    id: '123456'
                    name: New York
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  supplier:
                    id: '12345'
                    display_name: Windsurf Shop
                    address:
                      id: '123'
                      type: primary
                      string: 25 Spring Street, Blackburn, VIC 3130
                      name: HQ US
                      line1: Main street
                      line2: 'apt #'
                      line3: 'Suite #'
                      line4: delivery instructions
                      line5: 'Attention: Finance Dept'
                      street_number: '25'
                      city: San Francisco
                      state: CA
                      postal_code: '94104'
                      country: US
                      latitude: '40.759211'
                      longitude: '-73.984638'
                      county: Santa Clara
                      contact_name: Elon Musk
                      salutation: Mr
                      phone_number: 111-111-1111
                      fax: 122-111-1111
                      email: elon@musk.com
                      website: https://elonmusk.com
                      notes: Address notes or delivery instructions.
                      row_version: 1-12345
                  employee:
                    id: '12345'
                    display_id: EH
                    display_name: Ester Henderson
                  department_id: '12345'
                  location_id: '12345'
                  line_number: 1
                  worktags:
                    - id: '123456'
                      value: New York
              status: draft
              memo: Thank you for your business and have a great day!
              posted_at: '2020-09-30T07:43:32.000Z'
              journal_symbol: IND
              tax_type: sales
              tax_code: '1234'
              number: OIT00546
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              accounting_period: 01-24
              tax_inclusive: true
              source_type: manual
              source_id: '12345'
              row_version: 1-12345
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/journal-entries/{id}:
    get:
      tags:
        - Journal Entries
      operationId: journalEntriesOne
      summary: Get Journal Entry
      description: Get Journal Entry
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetJournalEntryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Journal Entries
      operationId: journalEntriesUpdate
      summary: Update Journal Entry
      description: Update Journal Entry
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: procountor-fi
          description: |
            Procountor only accepts the following values for the tax_code field: SALES, PURCHASE.
            Procountor requires row_version to be set when updating a journal entry. The row_version should be equivalent to the current row_version of the resource
        - connector: netsuite
          description: Netsuite only supports one tracking category at a time so only the first item in the tracking_categories list will be used.
        - connector: quickbooks
          description: |
            Quickbooks only supports one tracking category at a time so only the first item in the tracking_categories list will be used.
            When line_items[].tax_type is not set, QuickBooks requires knowing whether the tax applies to a sales or purchase transaction. Unify infers this from line_items[].type: credit lines are treated as sales (TaxApplicableOn: Sales) and debit lines as purchases (TaxApplicableOn: Purchase). This covers the common case of sales summary journal entries. For atypical entries (e.g. a credit to an AP account, or a debit for a sales return), set tax_type explicitly on each line to override the default.
        - connector: xero
          description: |
            Xero has two resources: journals (entries from transactions like invoices, payments, or manual journals) and manual journals (user-created entries).
            Draft entries are manual journals. When posted, they become journals and the ID changes. Updating a posted entry creates a reverse journal and a new one, so the ID also changes.
            Xero only supports `draft` and `posted` for the status field.
            For ledger accounts in journal lines, you can use either `ledger_account.id` (UUID) or `ledger_account.code`. If only the ID is provided, the code will be resolved automatically.
        - connector: sage-intacct
          description: |
            Sage Intacct only supports `draft` and `posted` status fields when updating a journal entry.
            If no status is provided then the default status is "draft".
            Only Journal Entries with `draft` status can be updated.
        - connector: workday
          description: |
            Status should be set to "draft" or "posted". Default status is "draft".
            Only Journal Entries with `draft` status can be updated.
        - connector: acumatica
          description: |
            Acumatica requires a separate Release action to transition a journal entry from Balanced to Posted.
            When `status: "posted"` is sent, Unify automatically calls the ReleaseJournalTransaction action after updating the entry.
            Only `status: "posted"` is supported for state transitions. Other values (`draft`, `voided`, etc.) are not supported — the entry will be updated but will remain in Balanced state.
            Once a journal entry is Posted, it cannot be edited. Any attempt to update a Posted entry will be rejected by Acumatica with an error.
            If the release step fails after a successful update, the entry will exist in Acumatica in Balanced state and the API will return an error. The update is not rolled back.
        - connector: myob-acumatica
          description: |
            MYOB Advanced (Acumatica) requires a separate Release action to transition a journal entry from Balanced to Posted.
            When `status: "posted"` is sent, Unify automatically calls the ReleaseJournalTransaction action after updating the entry.
            Only `status: "posted"` is supported for state transitions. Other values (`draft`, `voided`, etc.) are not supported — the entry will be updated but will remain in Balanced state.
            Once a journal entry is Posted, it cannot be edited. Any attempt to update a Posted entry will be rejected by Acumatica with an error.
            If the release step fails after a successful update, the entry will exist in MYOB Advanced in Balanced state and the API will return an error. The update is not rolled back.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JournalEntry'
      responses:
        '200':
          $ref: '#/components/responses/UpdateJournalEntryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            journalEntry:
              display_id: '12345'
              title: 'Purchase Invoice-Inventory (USD): 2019/02/01 Batch Summary Entry'
              currency_rate: 0.69
              currency: USD
              company_id: '12345'
              line_items:
                - description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  tax_amount: 27500
                  sub_total: 27500
                  total_amount: 27500
                  type: debit
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tax_type: sales
                  tracking_category:
                    id: '123456'
                    name: New York
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  supplier:
                    id: '12345'
                    display_name: Windsurf Shop
                    address:
                      id: '123'
                      type: primary
                      string: 25 Spring Street, Blackburn, VIC 3130
                      name: HQ US
                      line1: Main street
                      line2: 'apt #'
                      line3: 'Suite #'
                      line4: delivery instructions
                      line5: 'Attention: Finance Dept'
                      street_number: '25'
                      city: San Francisco
                      state: CA
                      postal_code: '94104'
                      country: US
                      latitude: '40.759211'
                      longitude: '-73.984638'
                      county: Santa Clara
                      contact_name: Elon Musk
                      salutation: Mr
                      phone_number: 111-111-1111
                      fax: 122-111-1111
                      email: elon@musk.com
                      website: https://elonmusk.com
                      notes: Address notes or delivery instructions.
                      row_version: 1-12345
                  employee:
                    id: '12345'
                    display_id: EH
                    display_name: Ester Henderson
                  department_id: '12345'
                  location_id: '12345'
                  line_number: 1
                  worktags:
                    - id: '123456'
                      value: New York
                - description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  tax_amount: 27500
                  sub_total: 27500
                  total_amount: 27500
                  type: debit
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tax_type: sales
                  tracking_category:
                    id: '123456'
                    name: New York
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  supplier:
                    id: '12345'
                    display_name: Windsurf Shop
                    address:
                      id: '123'
                      type: primary
                      string: 25 Spring Street, Blackburn, VIC 3130
                      name: HQ US
                      line1: Main street
                      line2: 'apt #'
                      line3: 'Suite #'
                      line4: delivery instructions
                      line5: 'Attention: Finance Dept'
                      street_number: '25'
                      city: San Francisco
                      state: CA
                      postal_code: '94104'
                      country: US
                      latitude: '40.759211'
                      longitude: '-73.984638'
                      county: Santa Clara
                      contact_name: Elon Musk
                      salutation: Mr
                      phone_number: 111-111-1111
                      fax: 122-111-1111
                      email: elon@musk.com
                      website: https://elonmusk.com
                      notes: Address notes or delivery instructions.
                      row_version: 1-12345
                  employee:
                    id: '12345'
                    display_id: EH
                    display_name: Ester Henderson
                  department_id: '12345'
                  location_id: '12345'
                  line_number: 1
                  worktags:
                    - id: '123456'
                      value: New York
              status: draft
              memo: Thank you for your business and have a great day!
              posted_at: '2020-09-30T07:43:32.000Z'
              journal_symbol: IND
              tax_type: sales
              tax_code: '1234'
              number: OIT00546
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              accounting_period: 01-24
              tax_inclusive: true
              source_type: manual
              source_id: '12345'
              row_version: 1-12345
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Journal Entries
      operationId: journalEntriesDelete
      summary: Delete Journal Entry
      description: Delete Journal Entry
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteJournalEntryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/purchase-orders:
    get:
      tags:
        - Purchase Orders
      operationId: purchaseOrdersAll
      summary: List Purchase Orders
      description: List Purchase Orders
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/purchaseOrdersFilter'
        - $ref: '#/components/parameters/purchaseOrdersSort'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: workday
          description: |
            When using the `supplier_id` filter, the `updated_since` filter should also be included.
      responses:
        '200':
          $ref: '#/components/responses/GetPurchaseOrdersResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Purchase Orders
      operationId: purchaseOrdersAdd
      summary: Create Purchase Order
      description: Create Purchase Order
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: "Xero accepts a shipping address as a string instead of separate fields. Ie: `23 Main Street\r\nCentral City\r\nMarineville\r\n1234\r\n`"
        - connector: procountor-fi
          description: |
            Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS. 
            Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: microsoft-dynamics-365-business-central
          description: |
            If you encounter a '400 Bad Request' error indicating "Control 'fieldName' is read-only" it means the 'editable' property for this field in Microsoft Dynamics 365 Business Central is currently set to false. To resolve this issue and make the field writable, simply update the 'editable' property to true in Microsoft Dynamics 365 Business Central.
        - connector: zoho-books
          description: |
            By default, the status of the purchase order will be set to "draft".
        - connector: workday
          description: |
            It is required to provide supplier.id, issued_date, company_id. Required fields for line items: tracking_categories.id (maps to Workday worktag/cost_center_id), description, category_id, budget, total_amount and type (must be either `sales_item` or `service`). For `sales_item` type, it is required to provide quantity, unit_price and unit_of_measure.
            To create a purchase order with a status `draft`, you need to provide the `status` field with a value `draft`. Default status is `open` (approved).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrder'
      responses:
        '201':
          $ref: '#/components/responses/CreatePurchaseOrderResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            purchaseOrder:
              display_id: '12345'
              po_number: '90000117'
              reference: '123456'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              subsidiary_id: '12345'
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              status: open
              issued_date: '2020-09-30'
              delivery_date: '2020-09-30'
              expected_arrival_date: '2020-09-30'
              currency: USD
              currency_rate: 0.69
              sub_total: 27500
              total_tax: 2500
              total: 27500
              tax_inclusive: true
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              template_id: '123456'
              discount_percentage: 5.5
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              accounting_by_row: false
              due_date: '2020-10-30'
              payment_method: cash
              terms: Net 30 days
              terms_id: '12345'
              amortization_type: manual
              tax_code: '1234'
              tax_method: Due to supplier
              issued_method: Email
              issued_email: john.doe@example.com
              channel: email
              memo: Thank you for the partnership and have a great day!
              notes: This is a test purchase order
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/purchase-orders/{id}:
    get:
      tags:
        - Purchase Orders
      operationId: purchaseOrdersOne
      summary: Get Purchase Order
      description: Get Purchase Order
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetPurchaseOrderResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Purchase Orders
      operationId: purchaseOrdersUpdate
      summary: Update Purchase Order
      description: Update Purchase Order
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: "Xero accepts a shipping address as a string instead of separate fields. Ie: `23 Main Street\r\nCentral City\r\nMarineville\r\n1234\r\n`"
        - connector: xero
          description: Purchase orders in xero can be tax inclusive, tax exclusive or no tax. The tax_inclusive field should be set to true, false or null if the purchase order is tax inclusive, tax exclusive or no tax.
        - connector: procountor-fi
          description: ''
          Procountor only accepts the following values for the payment_method field: BANK_TRANSFER, DIRECT_PAYMENT, CLEARING, CREDIT_CARD_CHARGE, FOREIGN_PAYMENT, OTHER, CASH, DOMESTIC_PAYMENT_PLUSGIRO, DOMESTIC_PAYMENT_BANKGIRO, DOMESTIC_PAYMENT_CREDITOR, DKLMPKRE, NETS.
          Procountor only accepts the following values for the channel field: EMAIL, MAIL, ELECTRONIC_INVOICE, EDIFACT, PAPER_INVOICE, NO_SENDING.
        - connector: zoho-books
          description: |
            Allowed values for the status are "draft", "open", "billed" and "deleted" when using the update method.
            Please send status updates separately from other updates for the supplier.
        - connector: workday
          description: |
            It is required to provide supplier.id, issued_date, company_id. Required fields for line items: tracking_categories.id (maps to Workday worktag/cost_center_id), description, category_id, budget, total_amount and type (must be either `sales_item` or `service`). For `sales_item` type, it is required to provide quantity, unit_price and unit_of_measure.
            Note: Only purchase orders with status `draft` can be updated.
        - connector: odoo
          description: |
            Delete operation cancels the purchase order (sets status to 'cancel') instead of hard-deleting it. Odoo does not allow hard deletion of purchase orders — they must be cancelled first. This follows standard accounting practice where financial documents are voided rather than deleted.
            Requires the Purchase module (purchase) to be installed on the Odoo instance.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrder'
      responses:
        '200':
          $ref: '#/components/responses/UpdatePurchaseOrderResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            purchaseOrder:
              display_id: '12345'
              po_number: '90000117'
              reference: '123456'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              subsidiary_id: '12345'
              company_id: '12345'
              location_id: '12345'
              department_id: '12345'
              status: open
              issued_date: '2020-09-30'
              delivery_date: '2020-09-30'
              expected_arrival_date: '2020-09-30'
              currency: USD
              currency_rate: 0.69
              sub_total: 27500
              total_tax: 2500
              total: 27500
              tax_inclusive: true
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  subsidiary_id: '12345'
                  shipping_id: '12345'
                  memo: Some memo
                  prepaid: true
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_applicable_on: Domestic_Purchase_of_Goods_and_Services
                  tax_recoverability: Fully_Recoverable
                  tax_method: Due_to_Supplier
                  worktags:
                    - id: '123456'
                      value: New York
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              template_id: '123456'
              discount_percentage: 5.5
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              accounting_by_row: false
              due_date: '2020-10-30'
              payment_method: cash
              terms: Net 30 days
              terms_id: '12345'
              amortization_type: manual
              tax_code: '1234'
              tax_method: Due to supplier
              issued_method: Email
              issued_email: john.doe@example.com
              channel: email
              memo: Thank you for the partnership and have a great day!
              notes: This is a test purchase order
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Purchase Orders
      operationId: purchaseOrdersDelete
      summary: Delete Purchase Order
      description: Delete Purchase Order
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeletePurchaseOrderResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/subsidiaries:
    get:
      tags:
        - Subsidiaries
      operationId: subsidiariesAll
      summary: List Subsidiaries
      description: List Subsidiaries
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
      responses:
        '200':
          $ref: '#/components/responses/GetSubsidiariesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Subsidiaries
      operationId: subsidiariesAdd
      summary: Create Subsidiary
      description: Create Subsidiary
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subsidiary'
      responses:
        '201':
          $ref: '#/components/responses/CreateSubsidiaryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            subsidiary:
              parent_id: '12345'
              name: SpaceX
              display_id: '12345'
              status: active
              address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              currencies:
                - USD
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/subsidiaries/{id}:
    get:
      tags:
        - Subsidiaries
      operationId: subsidiariesOne
      summary: Get Subsidiary
      description: Get Subsidiary
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetSubsidiaryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Subsidiaries
      operationId: subsidiariesUpdate
      summary: Update Subsidiary
      description: Update Subsidiary
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subsidiary'
      responses:
        '200':
          $ref: '#/components/responses/UpdateSubsidiaryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            subsidiary:
              parent_id: '12345'
              name: SpaceX
              display_id: '12345'
              status: active
              address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              currencies:
                - USD
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Subsidiaries
      operationId: subsidiariesDelete
      summary: Delete Subsidiary
      description: Delete Subsidiary
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteSubsidiaryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/locations:
    get:
      tags:
        - Locations
      operationId: locationsAll
      summary: List Locations
      description: List Locations
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/accountingLocationsFilter'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
      responses:
        '200':
          $ref: '#/components/responses/GetAccountingLocationsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Locations
      operationId: locationsAdd
      summary: Create Location
      description: Create Location
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingLocation'
      responses:
        '201':
          $ref: '#/components/responses/CreateAccountingLocationResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            location:
              parent_id: '12345'
              display_id: '123456'
              company_name: SpaceX
              display_name: 11 UT - South Jordan
              status: active
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              subsidiaries:
                - name: SpaceX
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/locations/{id}:
    get:
      tags:
        - Locations
      operationId: locationsOne
      summary: Get Location
      description: Get Location
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAccountingLocationResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Locations
      operationId: locationsUpdate
      summary: Update Location
      description: Update Location
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingLocation'
      responses:
        '200':
          $ref: '#/components/responses/UpdateAccountingLocationResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            location:
              parent_id: '12345'
              display_id: '123456'
              company_name: SpaceX
              display_name: 11 UT - South Jordan
              status: active
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              subsidiaries:
                - name: SpaceX
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Locations
      operationId: locationsDelete
      summary: Delete Location
      description: Delete Location
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteAccountingLocationResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/departments:
    get:
      tags:
        - Departments
      operationId: departmentsAll
      summary: List Departments
      description: List Departments
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/accountingDepartmentsFilter'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            The minimun page size accepted for Netsuite is 5. The cursor for Netsuite expires if they have not been used within 15 minutes after its creation.
        - connector: workday
          description: |
            Departments resource is not supported in Workday.
      responses:
        '200':
          $ref: '#/components/responses/GetAccountingDepartmentsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Departments
      operationId: departmentsAdd
      summary: Create Department
      description: Create Department
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingDepartment'
      responses:
        '201':
          $ref: '#/components/responses/CreateAccountingDepartmentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            department:
              parent_id: '12345'
              display_id: '123456'
              name: Sales
              status: active
              subsidiaries:
                - name: SpaceX
              code: '123'
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/departments/{id}:
    get:
      tags:
        - Departments
      operationId: departmentsOne
      summary: Get Department
      description: Get Department
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAccountingDepartmentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Departments
      operationId: departmentsUpdate
      summary: Update Department
      description: Update Department
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingDepartment'
      responses:
        '200':
          $ref: '#/components/responses/UpdateAccountingDepartmentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            department:
              parent_id: '12345'
              display_id: '123456'
              name: Sales
              status: active
              subsidiaries:
                - name: SpaceX
              code: '123'
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Departments
      operationId: departmentsDelete
      summary: Delete Department
      description: Delete Department
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteAccountingDepartmentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/attachments/{reference_type}/{reference_id}:
    get:
      tags:
        - Attachments
      operationId: attachmentsAll
      summary: List Attachments
      description: List Attachments
      parameters:
        - $ref: '#/components/parameters/referenceType'
        - $ref: '#/components/parameters/referenceId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAttachmentsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            referenceType: invoice
            referenceId: '123456'
    post:
      tags:
        - Attachments
      operationId: attachmentsUpload
      summary: Upload attachment
      description: Upload attachment
      x-sdk-exclude: true
      x-speakeasy-test: false
      servers:
        - url: https://upload.apideck.com
      parameters:
        - $ref: '#/components/parameters/referenceType'
        - $ref: '#/components/parameters/referenceId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/attachmentMetadata'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/contentType'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          '*/*':
            schema:
              type: string
              format: binary
      x-api-deck-gotchas:
        - connector: quickbooks
          description: Quickbooks limits attachment uploads to 100MB.
        - connector: xero
          description: Xero limits to 10 attachments per resource (invoices/bills) of 3.5MB each.
      responses:
        '201':
          $ref: '#/components/responses/CreateAttachmentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            referenceType: invoice
            referenceId: '123456'
            attachmentsUpload: string
  /accounting/attachments/{reference_type}/{reference_id}/{id}:
    get:
      tags:
        - Attachments
      operationId: attachmentsOne
      summary: Get Attachment
      description: Get Attachment
      parameters:
        - $ref: '#/components/parameters/referenceType'
        - $ref: '#/components/parameters/referenceId'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAttachmentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            referenceType: invoice
            referenceId: '123456'
            id: id_example
    delete:
      tags:
        - Attachments
      operationId: attachmentsDelete
      summary: Delete Attachment
      description: Delete Attachment
      parameters:
        - $ref: '#/components/parameters/referenceType'
        - $ref: '#/components/parameters/referenceId'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteAttachmentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            referenceType: invoice
            referenceId: '123456'
            id: id_example
  /accounting/attachments/{reference_type}/{reference_id}/{id}/download:
    get:
      tags:
        - Attachments
      operationId: attachmentsDownload
      summary: Download Attachment
      description: Download Attachment
      parameters:
        - $ref: '#/components/parameters/referenceType'
        - $ref: '#/components/parameters/referenceId'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAttachmentDownloadResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            referenceType: invoice
            referenceId: '123456'
            id: id_example
  /accounting/bank-accounts:
    get:
      tags:
        - Bank Accounts
      operationId: bankAccountsAll
      summary: List Bank Accounts
      description: List Bank Accounts
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/bankAccountsFilter'
        - $ref: '#/components/parameters/bankAccountsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: sage-intacct
          description: |
            Pagination is not supported when listing all bank accounts without an account_type filter.
      responses:
        '200':
          $ref: '#/components/responses/GetBankAccountsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Bank Accounts
      operationId: bankAccountsAdd
      summary: Create Bank Account
      description: Create Bank Account
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingBankAccount'
      responses:
        '201':
          $ref: '#/components/responses/CreateBankAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            bankAccount:
              display_id: BA-001
              name: Main Operating Account
              account_number: '123465'
              account_type: checking
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              bank_name: Chase Bank
              currency: USD
              balance: 25000
              available_balance: 24500
              overdraft_limit: 5000
              routing_number: '021000021'
              iban: GB33BUKB20201555555555
              bic: CHASUS33
              bsb_number: 062-001
              branch_identifier: '001'
              bank_code: BNH
              country: US
              status: active
              description: Primary operating account for daily transactions
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
  /accounting/bank-accounts/{id}:
    get:
      tags:
        - Bank Accounts
      operationId: bankAccountsOne
      summary: Get Bank Account
      description: Get Bank Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/bankAccountFilter'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetBankAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Bank Accounts
      operationId: bankAccountsUpdate
      summary: Update Bank Account
      description: Update Bank Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingBankAccount'
      responses:
        '200':
          $ref: '#/components/responses/UpdateBankAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            bankAccount:
              display_id: BA-001
              name: Main Operating Account
              account_number: '123465'
              account_type: checking
              ledger_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              bank_name: Chase Bank
              currency: USD
              balance: 25000
              available_balance: 24500
              overdraft_limit: 5000
              routing_number: '021000021'
              iban: GB33BUKB20201555555555
              bic: CHASUS33
              bsb_number: 062-001
              branch_identifier: '001'
              bank_code: BNH
              country: US
              status: active
              description: Primary operating account for daily transactions
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
    delete:
      tags:
        - Bank Accounts
      operationId: bankAccountsDelete
      summary: Delete Bank Account
      description: Delete Bank Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteBankAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/tracking-categories:
    get:
      tags:
        - Tracking Categories
      operationId: trackingCategoriesAll
      summary: List Tracking Categories
      description: List Tracking Categories
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: sage-intacct
          description: The Parent ID field refers to the parent tracking category code.
        - connector: xero
          description: Returns tracking category options only. IDs and names are concatenated as "CategoryName - OptionName". The provided ID can be used to link to the correct tracking category to invoices, bills, etc.
        - connector: microsoft-dynamics-365-business-central
          description: |
            The `limit` parameter is ignored. All tracking categories (parent dimensions and their Standard
            dimension values) are always returned in a single response. Non-Standard dimension value types
            (Begin-Total, End-Total, Heading, Total) are excluded as they cannot be assigned to transactions.
        - connector: fortnox
          description: |
            Fortnox has multiple analytic dimensions (`projects`, `cost-centers`, `DimAx1-3`). The unified
            `tracking-categories` resource exposes a **single** dimension (`projects`) to keep ids unambiguous.

            If you need values from another dimension, or values from multiple dimensions in one response, use
            `?raw=true` to retrieve the raw Fortnox payload and inspect the dimension you need. Note that
            Fortnox category codes are unique only within a dimension -- e.g. code `"100"` may exist on both
            `projects` and `cost-centers` and refer to different things. The unified id is the project number
            only; cross-dimension uniqueness is not guaranteed when raw-mode-merging happens client-side.

            For multi-dimension awareness in the unified API, see the upcoming `analytic-plans` /
            `analytic-categories` resources (parallel-resource path; non-breaking to this endpoint).
        - connector: pennylane
          description: |
            Pennylane is multi-plan native (`/analytic-plans` + `/analytic-accounts`). The unified
            `tracking-categories` resource flattens to one default plan; ids are unique within that plan but
            may collide across plans. Use `?raw=true` to retrieve the full multi-plan structure.
      responses:
        '200':
          $ref: '#/components/responses/GetTrackingCategoriesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Tracking Categories
      operationId: trackingCategoriesAdd
      summary: Create Tracking Category
      description: Create Tracking Category
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: sage-intacct
          description: When creating a category with parent ID please use the tracking category code.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrackingCategory'
      responses:
        '201':
          $ref: '#/components/responses/CreateTrackingCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            trackingCategory:
              parent_id: '12345'
              parent_name: Area
              name: Department
              code: '100'
              status: active
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              subsidiaries:
                - id: string
  /accounting/tracking-categories/{id}:
    get:
      tags:
        - Tracking Categories
      operationId: trackingCategoriesOne
      summary: Get Tracking Category
      description: Get Tracking Category
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: sage-intacct
          description: The Parent ID field refers to the parent tracking category code.
      responses:
        '200':
          $ref: '#/components/responses/GetTrackingCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Tracking Categories
      operationId: trackingCategoriesUpdate
      summary: Update Tracking Category
      description: Update Tracking Category
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrackingCategory'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: sage-intacct
          description: When updating the Parent ID field please use the tracking category code.
      responses:
        '200':
          $ref: '#/components/responses/UpdateTrackingCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            trackingCategory:
              parent_id: '12345'
              parent_name: Area
              name: Department
              code: '100'
              status: active
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
              subsidiaries:
                - id: string
    delete:
      tags:
        - Tracking Categories
      operationId: trackingCategoriesDelete
      summary: Delete Tracking Category
      description: Delete Tracking Category
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteTrackingCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/bill-payments:
    get:
      tags:
        - Bill Payments
      operationId: billPaymentsAll
      summary: List Bill Payments
      description: List Bill Payments
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/paymentsFilter'
        - $ref: '#/components/parameters/paymentsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            In order to read or write the `status` field, you must enable Approval Routing for Vendor Payments in Netsuite. Navigate to Setup > Accounting Preferences > Approval Routing > Vendor Payments > Approval Routing.
        - connector: sage-business-cloud-accounting
          description: |
            Bill payments are filtered using the `transaction_type_id` parameter, which defaults to `VENDOR_PAYMENT`. Use the `type` filter to retrieve other payment transaction types.
      responses:
        '200':
          $ref: '#/components/responses/GetBillPaymentsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Bill Payments
      operationId: billPaymentsAdd
      summary: Create Bill Payment
      description: Create Bill Payment
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            Payment method is required and must be `Check` or `CreditCard`.
        - connector: netsuite
          description: |
            In order to read or write the `status` field, you must enable Approval Routing for Vendor Payments in Netsuite. Navigate to Setup > Accounting Preferences > Approval Routing > Vendor Payments > Approval Routing.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillPayment'
      responses:
        '201':
          $ref: '#/components/responses/CreateBillPaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            billPayment:
              currency: USD
              currency_rate: 0.69
              total_amount: 49.99
              reference: '123456'
              payment_method: cash
              payment_method_reference: '123456'
              payment_method_id: '12345'
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              transaction_date: '2021-05-01T12:00:00.000Z'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              reconciled: true
              status: authorised
              type: accounts_payable
              allocations:
                - id: '12345'
                  type: bill
                  amount: 49.99
                  allocation_id: '123456'
              note: Some notes about this transaction
              number: '123456'
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              display_id: '123456'
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/bill-payments/{id}:
    get:
      tags:
        - Bill Payments
      operationId: billPaymentsOne
      summary: Get Bill Payment
      description: Get Bill Payment
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: netsuite
          description: |
            In order to read or write the `status` field, you must enable Approval Routing for Vendor Payments in Netsuite. Navigate to Setup > Accounting Preferences > Approval Routing > Vendor Payments > Approval Routing.
      responses:
        '200':
          $ref: '#/components/responses/GetBillPaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Bill Payments
      operationId: billPaymentsUpdate
      summary: Update Bill Payment
      description: Update Bill Payment
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            The `transaction_date` field is required.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillPayment'
      responses:
        '200':
          $ref: '#/components/responses/UpdateBillPaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            billPayment:
              currency: USD
              currency_rate: 0.69
              total_amount: 49.99
              reference: '123456'
              payment_method: cash
              payment_method_reference: '123456'
              payment_method_id: '12345'
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              transaction_date: '2021-05-01T12:00:00.000Z'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              reconciled: true
              status: authorised
              type: accounts_payable
              allocations:
                - id: '12345'
                  type: bill
                  amount: 49.99
                  allocation_id: '123456'
              note: Some notes about this transaction
              number: '123456'
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              display_id: '123456'
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Bill Payments
      operationId: billPaymentsDelete
      summary: Delete Bill Payment
      description: Delete Bill Payment
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: freshbooks
          description: |
            Delete will set the payment to inactive and will soft delete it, meaning it will stop appearing in the list API call. However, it can still be found via the get by id call.
      responses:
        '200':
          $ref: '#/components/responses/DeleteBillPaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/expenses:
    get:
      tags:
        - Expenses
      operationId: expensesAll
      summary: List Expenses
      description: List Expenses
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/expensesFilter'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: In Xero, both suppliers (also used for employees) and customers are identified using the same contact ID, which maps to both `supplier_id` and `customer_id`. To accurately determine the contact type, use the suppliers and customers endpoints.
      responses:
        '200':
          $ref: '#/components/responses/GetExpensesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Expenses
      operationId: expensesAdd
      summary: Create Expense
      description: Create Expense
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: When creating an expense for Xero, ensure the `account_id` corresponds to a 'bank' or 'credit_card' account type. Using other account types may result in errors or unexpected behavior.
        - connector: sage-intacct
          description: When creating an expense for Sage Intacct, the account_id must refer to a credit card account, not a ledger account. You can find the correct credit card account ID in Sage Intacct under the Credit Cards section.
        - connector: dualentry
          description: DualEntry requires `company_id`, `supplier` (vendor_id), `account` (account_number), and `currency` (currency_iso_4217_code) when creating a direct expense, even though these fields are optional in the unified schema.
        - connector: microsoft-dynamics-365-business-central
          description: |
            Employee account type: set `account.type` to `"employee"` and `account.id` to the employee number (or GUID, which will be resolved automatically). Note: reading back the expense will NOT return the employee reference — employee payment lines are invisible in BC's API for draft entries, and resolve to a GL payable account when posted.
        - connector: zoho-books
          description: Zoho Books supports only one customer and one rebilling (`rebillable`) flag per expense at the header level. Only provide these in the first line_item — they will be mapped to the header-level fields and applied to all lines. If differentiated treatment is required, create separate expenses.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Expense'
      responses:
        '201':
          $ref: '#/components/responses/CreateExpenseResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            expense:
              display_id: '123456'
              number: OIT00546
              transaction_date: '2021-05-01T12:00:00.000Z'
              account_id: '123456'
              account:
                id: '123456'
                type: ledger_account
                code: '1100'
                display_id: '123456'
                account_number: '123465'
              supplier_id: '12345'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              department_id: '12345'
              department:
                display_id: '123456'
                name: Acme Inc.
              payment_type: cash
              currency: USD
              currency_rate: 0.69
              type: expense
              memo: For travel expenses incurred on 2024-05-15
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tax_inclusive: true
              sub_total: 250
              total_tax: 25
              total_amount: 275
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              line_items:
                - tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  account_id: '123456'
                  account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  customer_id: '12345'
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  department_id: '12345'
                  department:
                    display_id: '123456'
                    name: Acme Inc.
                  location_id: '12345'
                  location:
                    id: '123456'
                    display_id: '123456'
                    name: New York Office
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  description: Travel US.
                  type: expense_account
                  total_amount: 275
                  tax_amount: 27.5
                  quantity: 1
                  unit_price: 27500.5
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  line_number: 1
                  rebilling:
                    rebillable: true
                    rebill_status: billed
                    linked_transaction_id: txn_abc123
                    linked_transaction_line_id: line_xyz789
              reference: INV-2024-001
              source_document_url: https://www.invoicesolution.com/expense/123456
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              status: draft
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/expenses/{id}:
    get:
      tags:
        - Expenses
      operationId: expensesOne
      summary: Get Expense
      description: Get Expense
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: In Xero, both suppliers (also used for employees) and customers are identified using the same contact ID, which maps to both `supplier_id` and `customer_id`. To accurately determine the contact type, use the suppliers and customers endpoints.
        - connector: zoho-books
          description: Zoho Books supports only one customer and one rebilling (`rebillable`) flag per expense at the header level. When reading, all line_items will return the same customer and rebilling values.
      responses:
        '200':
          $ref: '#/components/responses/GetExpenseResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Expenses
      operationId: expensesUpdate
      summary: Update Expense
      description: Update Expense
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: dualentry
          description: DualEntry requires `company_id`, `supplier` (vendor_id), `account` (account_number), and `currency` (currency_iso_4217_code) when updating a direct expense, even though these fields are optional in the unified schema.
        - connector: zoho-books
          description: Zoho Books supports only one customer and one rebilling (`rebillable`) flag per expense at the header level. Only provide these in the first line_item — they will be mapped to the header-level fields and applied to all lines. If differentiated treatment is required, create separate expenses.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Expense'
      responses:
        '200':
          $ref: '#/components/responses/UpdateExpenseResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            expense:
              display_id: '123456'
              number: OIT00546
              transaction_date: '2021-05-01T12:00:00.000Z'
              account_id: '123456'
              account:
                id: '123456'
                type: ledger_account
                code: '1100'
                display_id: '123456'
                account_number: '123465'
              supplier_id: '12345'
              supplier:
                id: '12345'
                display_name: Windsurf Shop
                address:
                  id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              company_id: '12345'
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              department_id: '12345'
              department:
                display_id: '123456'
                name: Acme Inc.
              payment_type: cash
              currency: USD
              currency_rate: 0.69
              type: expense
              memo: For travel expenses incurred on 2024-05-15
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tax_inclusive: true
              sub_total: 250
              total_tax: 25
              total_amount: 275
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              line_items:
                - tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  account_id: '123456'
                  account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  customer_id: '12345'
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  department_id: '12345'
                  department:
                    display_id: '123456'
                    name: Acme Inc.
                  location_id: '12345'
                  location:
                    id: '123456'
                    display_id: '123456'
                    name: New York Office
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  description: Travel US.
                  type: expense_account
                  total_amount: 275
                  tax_amount: 27.5
                  quantity: 1
                  unit_price: 27500.5
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  line_number: 1
                  rebilling:
                    rebillable: true
                    rebill_status: billed
                    linked_transaction_id: txn_abc123
                    linked_transaction_line_id: line_xyz789
              reference: INV-2024-001
              source_document_url: https://www.invoicesolution.com/expense/123456
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              status: draft
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Expenses
      operationId: expensesDelete
      summary: Delete Expense
      description: Delete Expense
      x-apideck-gotchas:
        - connector: sage-intacct
          description: The delete operation for credit card transactions in Sage Intacct is not a true deletion. Instead, it performs a reversal using the reverse_cctransaction function.
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteExpenseResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/aged-creditors:
    get:
      tags:
        - Aged Creditors
      operationId: agedCreditorsOne
      summary: Get Aged Creditors
      description: Get Aged Creditors
      x-apideck-upcoming: true
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/agedReportFilter'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAgedCreditorsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /accounting/aged-debtors:
    get:
      tags:
        - Aged Debtors
      operationId: agedDebtorsOne
      summary: Get Aged Debtors
      description: Get Aged Debtors
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/agedReportFilter'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAgedDebtorsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /accounting/bank-feed-accounts:
    get:
      tags:
        - Bank Feed Accounts
      operationId: bankFeedAccountsAll
      summary: List Bank Feed Accounts
      description: List Bank Feed Accounts
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: |
            Bank Feed Accounts in Xero represent bank accounts connected to Xero's Bank Feeds feature, which automatically imports bank transactions into Xero on a daily basis.
            For more information on setting up and using Bank Feeds with Xero, see the [Bank Feeds for Xero guide](https://developers.apideck.com/guides/bank-feeds-xero).
      responses:
        '200':
          $ref: '#/components/responses/GetBankFeedAccountsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Bank Feed Accounts
      operationId: bankFeedAccountsAdd
      summary: Create Bank Feed Account
      description: Create Bank Feed Account
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: |
            Bank Feed Accounts in Xero represent bank accounts connected to Xero's Bank Feeds feature, which automatically imports bank transactions into Xero on a daily basis.
            For more information on setting up and using Bank Feeds with Xero, see the [Bank Feeds for Xero guide](https://developers.apideck.com/guides/bank-feeds-xero).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankFeedAccount'
      responses:
        '201':
          $ref: '#/components/responses/CreateBankFeedAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            bankFeedAccount:
              bank_account_type: bank
              source_account_id: src_456
              target_account_id: tgt_789
              target_account_name: Main Company Checking
              target_account_number: NL91ABNA0417164300
              currency: USD
              feed_status: pending
              country: US
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
  /accounting/bank-feed-accounts/{id}:
    get:
      tags:
        - Bank Feed Accounts
      operationId: bankFeedAccountsOne
      summary: Get Bank Feed Account
      description: Get Bank Feed Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      responses:
        '200':
          $ref: '#/components/responses/GetBankFeedAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Bank Feed Accounts
      operationId: bankFeedAccountsUpdate
      summary: Update Bank Feed Account
      description: Update Bank Feed Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankFeedAccount'
      responses:
        '200':
          $ref: '#/components/responses/UpdateBankFeedAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            bankFeedAccount:
              bank_account_type: bank
              source_account_id: src_456
              target_account_id: tgt_789
              target_account_name: Main Company Checking
              target_account_number: NL91ABNA0417164300
              currency: USD
              feed_status: pending
              country: US
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
    delete:
      tags:
        - Bank Feed Accounts
      operationId: bankFeedAccountsDelete
      summary: Delete Bank Feed Account
      description: Delete Bank Feed Account
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      responses:
        '200':
          $ref: '#/components/responses/DeleteBankFeedAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/bank-feed-statements:
    get:
      tags:
        - Bank Feed Statements
      operationId: bankFeedStatementsAll
      summary: List Bank Feed Statements
      description: List Bank Feed Statements
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      responses:
        '200':
          $ref: '#/components/responses/GetBankFeedStatementsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Bank Feed Statements
      operationId: bankFeedStatementsAdd
      summary: Create Bank Feed Statement
      description: Create Bank Feed Statement
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: xero
          description: |
            In Xero, if a transaction ID has been previously used, the API will reject the entire bank feed statement.
            However, if the statement includes multiple transactions and at least one transaction ID is unique, 
            the API will return a success response but will not process the transactions with duplicate IDs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankFeedStatement'
      responses:
        '201':
          $ref: '#/components/responses/CreateBankFeedStatementResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            bankFeedStatement:
              bank_feed_account_id: acc_456
              status: pending
              start_date: '2021-05-01T12:00:00.000Z'
              end_date: '2025-01-31T12:00:00.000Z'
              start_balance: 10500.25
              start_balance_credit_or_debit: debit
              end_balance: 9800.5
              end_balance_credit_or_debit: debit
              transactions:
                - posted_date: '2025-01-15T12:00:00.000Z'
                  description: Payment received from ACME Corp
                  amount: 250
                  credit_or_debit: debit
                  source_transaction_id: txn_987
                  counterparty: ACME Corp
                  reference: INV-2025-01
                  transaction_type: payment
  /accounting/bank-feed-statements/{id}:
    get:
      tags:
        - Bank Feed Statements
      operationId: bankFeedStatementsOne
      summary: Get Bank Feed Statement
      description: Get Bank Feed Statement
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      responses:
        '200':
          $ref: '#/components/responses/GetBankFeedStatementResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Bank Feed Statements
      operationId: bankFeedStatementsUpdate
      summary: Update Bank Feed Statement
      description: Update Bank Feed Statement
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankFeedStatement'
      responses:
        '200':
          $ref: '#/components/responses/UpdateBankFeedStatementResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            bankFeedStatement:
              bank_feed_account_id: acc_456
              status: pending
              start_date: '2021-05-01T12:00:00.000Z'
              end_date: '2025-01-31T12:00:00.000Z'
              start_balance: 10500.25
              start_balance_credit_or_debit: debit
              end_balance: 9800.5
              end_balance_credit_or_debit: debit
              transactions:
                - posted_date: '2025-01-15T12:00:00.000Z'
                  description: Payment received from ACME Corp
                  amount: 250
                  credit_or_debit: debit
                  source_transaction_id: txn_987
                  counterparty: ACME Corp
                  reference: INV-2025-01
                  transaction_type: payment
    delete:
      tags:
        - Bank Feed Statements
      operationId: bankFeedStatementsDelete
      summary: Delete Bank Feed Statement
      description: Delete Bank Feed Statement
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      x-apideck-gotchas: null
      responses:
        '200':
          $ref: '#/components/responses/DeleteBankFeedStatementResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/categories:
    get:
      tags:
        - Categories
      operationId: categoriesAll
      summary: List Categories
      description: List Categories
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/categoriesFilter'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: workday
          description: It is required to pass the filter[type] parameter to the request. For supplier categories, use the `supplier` value. For resource/spend categories, use the `expense` value. For revenue categories, use the `revenue` value.
      responses:
        '200':
          $ref: '#/components/responses/GetCategoriesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /accounting/categories/{id}:
    get:
      tags:
        - Categories
      operationId: categoriesOne
      summary: Get Category
      description: Get Category
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/categoriesFilter'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: workday
          description: It is required to pass the filter[type] parameter to the request. For supplier categories, use the `supplier` value. For resource/spend categories, use the `expense` value. For revenue categories, use the `revenue` value.
      responses:
        '200':
          $ref: '#/components/responses/GetCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/quotes:
    get:
      tags:
        - Quotes
      operationId: quotesAll
      summary: List Quotes
      description: List Quotes
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: afas
          description: |
            AFAS Profit's default sales-quotes GetConnector (`Profit_Quotation`) only exists on tenants that have the sales-quotes module deployed. On tenants without it, the list returns empty. Override `quotes_connector` on the connection to point at a tenant-specific quotes GetConnector if available.

            The `limit` parameter may return fewer quotes than specified. AFAS returns flat quote line rows which are grouped by `OrderNumber` into complete quotes. `limit=N` caps the raw row count, not the grouped quote count.
      responses:
        '200':
          $ref: '#/components/responses/GetQuotesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Quotes
      operationId: quotesAdd
      summary: Create Quote
      description: Create Quote
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Quote'
      responses:
        '201':
          $ref: '#/components/responses/CreateQuoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            quote:
              number: QT00546
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              sales_order_id: '123456'
              company_id: '12345'
              department_id: '12345'
              project_id: '12345'
              quote_date: '2020-09-30'
              expiry_date: '2020-10-30'
              terms: Valid for 30 days
              terms_id: '12345'
              reference: INV-2024-001
              status: draft
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 27500
              total_tax: 2500
              tax_code: '1234'
              discount_percentage: 5.5
              discount_amount: 25
              total: 27500
              customer_memo: Thank you for considering our services!
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              template_id: '123456'
              source_document_url: https://www.quotesolution.com/quote/123456
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/quotes/{id}:
    get:
      tags:
        - Quotes
      operationId: quotesOne
      summary: Get Quote
      description: Get Quote
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetQuoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Quotes
      operationId: quotesUpdate
      summary: Update Quote
      description: Update Quote
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Quote'
      responses:
        '200':
          $ref: '#/components/responses/UpdateQuoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            quote:
              number: QT00546
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              sales_order_id: '123456'
              company_id: '12345'
              department_id: '12345'
              project_id: '12345'
              quote_date: '2020-09-30'
              expiry_date: '2020-10-30'
              terms: Valid for 30 days
              terms_id: '12345'
              reference: INV-2024-001
              status: draft
              currency: USD
              currency_rate: 0.69
              tax_inclusive: true
              sub_total: 27500
              total_tax: 2500
              tax_code: '1234'
              discount_percentage: 5.5
              discount_amount: 25
              total: 27500
              customer_memo: Thank you for considering our services!
              line_items:
                - id: '12345'
                  row_id: '12345'
                  code: 120-C
                  line_number: 1
                  description: Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.
                  type: sales_item
                  tax_amount: 27500
                  total_amount: 27500
                  quantity: 1
                  unit_price: 27500.5
                  unit_of_measure: pc.
                  discount_percentage: 0.01
                  discount_amount: 19.99
                  service_date: '2024-01-15'
                  category_id: '12345'
                  location_id: '12345'
                  department_id: '12345'
                  item:
                    id: '12344'
                    code: 120-C
                    name: Model Y
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  ledger_account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  custom_fields:
                    - id: '2389328923893298'
                      name: employee_level
                      description: Employee Level
                      value: Uses Salesforce and Marketo
                  row_version: 1-12345
              billing_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              shipping_address:
                id: '123'
                type: primary
                string: 25 Spring Street, Blackburn, VIC 3130
                name: HQ US
                line1: Main street
                line2: 'apt #'
                line3: 'Suite #'
                line4: delivery instructions
                line5: 'Attention: Finance Dept'
                street_number: '25'
                city: San Francisco
                state: CA
                postal_code: '94104'
                country: US
                latitude: '40.759211'
                longitude: '-73.984638'
                county: Santa Clara
                contact_name: Elon Musk
                salutation: Mr
                phone_number: 111-111-1111
                fax: 122-111-1111
                email: elon@musk.com
                website: https://elonmusk.com
                notes: Address notes or delivery instructions.
                row_version: 1-12345
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              template_id: '123456'
              source_document_url: https://www.quotesolution.com/quote/123456
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Quotes
      operationId: quotesDelete
      summary: Delete Quote
      description: Delete Quote
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteQuoteResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/projects:
    get:
      tags:
        - Projects
      operationId: projectsAll
      summary: List projects
      description: List projects
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/projectsFilter'
        - $ref: '#/components/parameters/projectsSort'
        - $ref: '#/components/parameters/passThrough'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            The `priority` field is mapped from QuickBooks integer values (0-9) to unified enum values using ranges: 0-2 → "low", 3-5 → "medium", 6-7 → "high", 8-9 → "critical".
      responses:
        '200':
          $ref: '#/components/responses/GetProjectsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Projects
      operationId: projectsAdd
      summary: Create project
      description: Create project
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            The `priority` field accepts enum values ("low", "medium", "high", "critical") which are converted to QuickBooks integer values: "low" → 2, "medium" → 5, "high" → 7, "critical" → 9.
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Project'
      responses:
        '201':
          $ref: '#/components/responses/CreateProjectResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            project:
              name: Website Redesign Project
              display_id: PROJ-001
              reference_id: WD-REF-2024-001
              description: Complete redesign of the company website including new branding and improved user experience
              status: active
              active: true
              project_type: client_project
              priority: high
              completion_percentage: 75.5
              start_date: '2024-01-15'
              end_date: '2024-06-30'
              completion_date: '2024-08-06'
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              department:
                id: DEPT-001
                name: Marketing
              company_id: '12345'
              owner_id: '12345'
              parent_project:
                id: PROJ-PARENT-001
                name: Company Website Overhaul
              currency: USD
              budget_amount: 50000
              approved_amount: 48000
              budget_hours: 400
              hourly_rate: 125
              billing_method: time_and_materials
              is_billable: true
              phase: execution
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              tags: *ref_1
              notes: Client has requested modern design with mobile-first approach
              contract_number: CNT-2024-001
              profit_margin: 15.5
              schedule_status: on_schedule
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              team_size: 8
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
  /accounting/projects/{id}:
    get:
      tags:
        - Projects
      operationId: projectsOne
      summary: Get project
      description: Get project
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            The `priority` field is mapped from QuickBooks integer values (0-9) to unified enum values using ranges: 0-2 → "low", 3-5 → "medium", 6-7 → "high", 8-9 → "critical".
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetProjectResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Projects
      operationId: projectsUpdate
      summary: Update project
      description: Update project
      x-apideck-gotchas:
        - connector: quickbooks
          description: |
            The `priority` field accepts enum values ("low", "medium", "high", "critical") which are converted to QuickBooks integer values: "low" → 2, "medium" → 5, "high" → 7, "critical" → 9.
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Project'
      responses:
        '200':
          $ref: '#/components/responses/UpdateProjectResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            project:
              name: Website Redesign Project
              display_id: PROJ-001
              reference_id: WD-REF-2024-001
              description: Complete redesign of the company website including new branding and improved user experience
              status: active
              active: true
              project_type: client_project
              priority: high
              completion_percentage: 75.5
              start_date: '2024-01-15'
              end_date: '2024-06-30'
              completion_date: '2024-08-06'
              customer:
                id: '12345'
                display_name: Windsurf Shop
                name: Windsurf Shop
                email: boring@boring.com
              department:
                id: DEPT-001
                name: Marketing
              company_id: '12345'
              owner_id: '12345'
              parent_project:
                id: PROJ-PARENT-001
                name: Company Website Overhaul
              currency: USD
              budget_amount: 50000
              approved_amount: 48000
              budget_hours: 400
              hourly_rate: 125
              billing_method: time_and_materials
              is_billable: true
              phase: execution
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              tags: *ref_1
              notes: Client has requested modern design with mobile-first approach
              contract_number: CNT-2024-001
              profit_margin: 15.5
              schedule_status: on_schedule
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              team_size: 8
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
    delete:
      tags:
        - Projects
      operationId: projectsDelete
      summary: Delete project
      description: Delete project
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteProjectResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/employees:
    get:
      tags:
        - Employees
      operationId: employeesAll
      summary: List Employees
      description: List Employees
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/accountingEmployeesFilter'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAccountingEmployeesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Employees
      operationId: employeesAdd
      summary: Create Employee
      description: Create Employee
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingEmployee'
      responses:
        '201':
          $ref: '#/components/responses/CreateAccountingEmployeeResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            employee:
              display_id: '123456'
              first_name: John
              last_name: Doe
              display_name: John Doe
              emails:
                - id: '123'
                  email: elon@musk.com
                  type: primary
              employee_number: EMP-001
              job_title: Senior Accountant
              status: active
              is_contractor: false
              department:
                display_id: '123456'
                name: Acme Inc.
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              manager:
                id: '12345'
                name: Jane Smith
              hire_date: '2020-01-15'
              termination_date: '2025-12-31'
              gender: male
              birth_date: '1990-05-20'
              subsidiary:
                display_id: '123456'
                name: Acme Inc.
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              currency: USD
              notes: Some notes about this employee
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              phone_numbers:
                - id: '12345'
                  country_code: '1'
                  area_code: '323'
                  number: 111-111-1111
                  extension: '105'
                  type: primary
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/employees/{id}:
    get:
      tags:
        - Employees
      operationId: employeesOne
      summary: Get Employee
      description: Get Employee
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetAccountingEmployeeResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Employees
      operationId: employeesUpdate
      summary: Update Employee
      description: Update Employee
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingEmployee'
      responses:
        '200':
          $ref: '#/components/responses/UpdateAccountingEmployeeResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            employee:
              display_id: '123456'
              first_name: John
              last_name: Doe
              display_name: John Doe
              emails:
                - id: '123'
                  email: elon@musk.com
                  type: primary
              employee_number: EMP-001
              job_title: Senior Accountant
              status: active
              is_contractor: false
              department:
                display_id: '123456'
                name: Acme Inc.
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              manager:
                id: '12345'
                name: Jane Smith
              hire_date: '2020-01-15'
              termination_date: '2025-12-31'
              gender: male
              birth_date: '1990-05-20'
              subsidiary:
                display_id: '123456'
                name: Acme Inc.
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              currency: USD
              notes: Some notes about this employee
              addresses:
                - id: '123'
                  type: primary
                  string: 25 Spring Street, Blackburn, VIC 3130
                  name: HQ US
                  line1: Main street
                  line2: 'apt #'
                  line3: 'Suite #'
                  line4: delivery instructions
                  line5: 'Attention: Finance Dept'
                  street_number: '25'
                  city: San Francisco
                  state: CA
                  postal_code: '94104'
                  country: US
                  latitude: '40.759211'
                  longitude: '-73.984638'
                  county: Santa Clara
                  contact_name: Elon Musk
                  salutation: Mr
                  phone_number: 111-111-1111
                  fax: 122-111-1111
                  email: elon@musk.com
                  website: https://elonmusk.com
                  notes: Address notes or delivery instructions.
                  row_version: 1-12345
              phone_numbers:
                - id: '12345'
                  country_code: '1'
                  area_code: '323'
                  number: 111-111-1111
                  extension: '105'
                  type: primary
              bank_account:
                bank_name: Chase Bank
                account_number: '123465'
                account_name: Main Operating Account
                account_type: credit_card
                iban: GB33BUKB20201555555555
                bic: CHASUS33
                routing_number: '021000021'
                bsb_number: 062-001
                branch_identifier: '001'
                bank_code: BNH
                currency: USD
                country: US
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Employees
      operationId: employeesDelete
      summary: Delete Employee
      description: Delete Employee
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteAccountingEmployeeResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/expense-categories:
    get:
      tags:
        - Expense Categories
      operationId: expenseCategoriesAll
      summary: List Expense Categories
      description: List Expense Categories
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/expenseCategoriesFilter'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetExpenseCategoriesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Expense Categories
      operationId: expenseCategoriesAdd
      summary: Create Expense Category
      description: Create Expense Category
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseCategory'
      responses:
        '201':
          $ref: '#/components/responses/CreateExpenseCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            expenseCategory:
              display_id: '123456'
              name: Travel
              code: TRAVEL-001
              description: Travel-related expenses including flights, hotels, and ground transportation.
              status: active
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              offset_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              rate_required: false
              default_rate: 0.67
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/expense-categories/{id}:
    get:
      tags:
        - Expense Categories
      operationId: expenseCategoriesOne
      summary: Get Expense Category
      description: Get Expense Category
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetExpenseCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Expense Categories
      operationId: expenseCategoriesUpdate
      summary: Update Expense Category
      description: Update Expense Category
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseCategory'
      responses:
        '200':
          $ref: '#/components/responses/UpdateExpenseCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            expenseCategory:
              display_id: '123456'
              name: Travel
              code: TRAVEL-001
              description: Travel-related expenses including flights, hotels, and ground transportation.
              status: active
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              offset_account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              tax_rate:
                id: '123456'
                code: N-T
                rate: 10
              rate_required: false
              default_rate: 0.67
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Expense Categories
      operationId: expenseCategoriesDelete
      summary: Delete Expense Category
      description: Delete Expense Category
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteExpenseCategoryResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
  /accounting/expense-reports:
    get:
      tags:
        - Expense Reports
      operationId: expenseReportsAll
      summary: List Expense Reports
      description: List Expense Reports
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/expenseReportsFilter'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetExpenseReportsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Expense Reports
      operationId: expenseReportsAdd
      summary: Create Expense Report
      description: Create Expense Report
      parameters:
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseReport'
      responses:
        '201':
          $ref: '#/components/responses/CreateExpenseReportResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            expenseReport:
              display_id: '123456'
              number: ER-001
              title: Q1 Business Travel
              employee:
                id: '12345'
                display_name: John Doe
              status: submitted
              transaction_date: '2021-05-01T12:00:00.000Z'
              posting_date: '2024-06-01'
              due_date: '2024-06-15'
              currency: USD
              currency_rate: 0.69
              sub_total: 250
              total_tax: 25
              total_amount: 1250.75
              reimbursable_amount: 1100
              memo: Business travel expenses for Q1 client meetings
              department:
                display_id: '123456'
                name: Acme Inc.
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              accounting_period:
                id: '12345'
                name: Q1 2024
              line_items:
                - line_number: 1
                  expense_category:
                    id: '12345'
                    downstream_id: '12345'
                    display_id: Airfare
                    name: Airfare
                  account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  description: Flight to New York
                  quantity: 1
                  unit_price: 27500.5
                  amount: 275
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tax_amount: 27.5
                  total_amount: 302.5
                  transaction_date: '2024-05-15'
                  billable: true
                  reimbursable: true
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  department:
                    display_id: '123456'
                    name: Acme Inc.
                  location:
                    id: '123456'
                    display_id: '123456'
                    name: New York Office
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  receipt_url: https://example.com/receipts/123.pdf
                  currency: USD
              subsidiary:
                display_id: '123456'
                name: Acme Inc.
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              tax_inclusive: true
              approved_by:
                id: '12345'
                display_name: Jane Smith
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
  /accounting/expense-reports/{id}:
    get:
      tags:
        - Expense Reports
      operationId: expenseReportsOne
      summary: Get Expense Report
      description: Get Expense Report
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
        - $ref: '#/components/parameters/fields'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetExpenseReportResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
    patch:
      tags:
        - Expense Reports
      operationId: expenseReportsUpdate
      summary: Update Expense Report
      description: Update Expense Report
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseReport'
      responses:
        '200':
          $ref: '#/components/responses/UpdateExpenseReportResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
            expenseReport:
              display_id: '123456'
              number: ER-001
              title: Q1 Business Travel
              employee:
                id: '12345'
                display_name: John Doe
              status: submitted
              transaction_date: '2021-05-01T12:00:00.000Z'
              posting_date: '2024-06-01'
              due_date: '2024-06-15'
              currency: USD
              currency_rate: 0.69
              sub_total: 250
              total_tax: 25
              total_amount: 1250.75
              reimbursable_amount: 1100
              memo: Business travel expenses for Q1 client meetings
              department:
                display_id: '123456'
                name: Acme Inc.
              location:
                id: '123456'
                display_id: '123456'
                name: New York Office
              account:
                id: '123456'
                name: Bank account
                nominal_code: N091
                code: '453'
                parent_id: '123456'
                display_id: '123456'
              accounting_period:
                id: '12345'
                name: Q1 2024
              line_items:
                - line_number: 1
                  expense_category:
                    id: '12345'
                    downstream_id: '12345'
                    display_id: Airfare
                    name: Airfare
                  account:
                    id: '123456'
                    name: Bank account
                    nominal_code: N091
                    code: '453'
                    parent_id: '123456'
                    display_id: '123456'
                  description: Flight to New York
                  quantity: 1
                  unit_price: 27500.5
                  amount: 275
                  tax_rate:
                    id: '123456'
                    code: N-T
                    rate: 10
                  tax_amount: 27.5
                  total_amount: 302.5
                  transaction_date: '2024-05-15'
                  billable: true
                  reimbursable: true
                  customer:
                    id: '12345'
                    display_name: Windsurf Shop
                    name: Windsurf Shop
                    email: boring@boring.com
                  department:
                    display_id: '123456'
                    name: Acme Inc.
                  location:
                    id: '123456'
                    display_id: '123456'
                    name: New York Office
                  tracking_categories:
                    - id: '123456'
                      code: '100'
                      name: New York
                      parent_id: '123456'
                      parent_name: New York
                  receipt_url: https://example.com/receipts/123.pdf
                  currency: USD
              subsidiary:
                display_id: '123456'
                name: Acme Inc.
              tracking_categories:
                - id: '123456'
                  code: '100'
                  name: New York
                  parent_id: '123456'
                  parent_name: New York
              tax_inclusive: true
              approved_by:
                id: '12345'
                display_name: Jane Smith
              custom_fields:
                - id: '2389328923893298'
                  name: employee_level
                  description: Employee Level
                  value: Uses Salesforce and Marketo
              row_version: 1-12345
              pass_through:
                - service_id: string
                  operation_id: string
                  extend_object: {}
                  extend_paths:
                    - path: $.nested.property
                      value: *ref_0
    delete:
      tags:
        - Expense Reports
      operationId: expenseReportsDelete
      summary: Delete Expense Report
      description: Delete Expense Report
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/serviceId'
        - $ref: '#/components/parameters/raw'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteExpenseReportResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: accounting
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            id: id_example
x-webhooks:
  x-sdk-exclude: true
  x-speakeasy-ignore: true
  CustomerCreated:
    post:
      summary: Customer Created
      operationId: customerCreated
      x-apideck-event-type: accounting.customer.created
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.customer.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/customers/123456ASDF
                entity_type: customer
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a customer has been created.
  CustomerUpdated:
    post:
      summary: Customer Updated
      operationId: customerUpdated
      x-apideck-event-type: accounting.customer.updated
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.customer.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/customers/123456ASDF
                entity_type: customer
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a customer has been updated.
  CustomerDeleted:
    post:
      summary: Customer Deleted
      operationId: customerDeleted
      x-apideck-event-type: accounting.customer.deleted
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.customer.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/customers/123456ASDF
                entity_type: customer
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a customer has been deleted.
  InvoiceCreated:
    post:
      summary: Invoice Created
      operationId: invoiceCreated
      x-apideck-event-type: accounting.invoice.created
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.invoice.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/invoices/123456ASDF
                entity_type: invoice
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when an invoice has been created.
  InvoiceUpdated:
    post:
      summary: Invoice Updated
      operationId: invoiceUpdated
      x-apideck-event-type: accounting.invoice.updated
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.invoice.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/invoices/123456ASDF
                entity_type: invoice
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when an invoice has been updated.
  InvoiceDeleted:
    post:
      summary: Invoice Deleted
      operationId: invoiceDeleted
      x-apideck-event-type: accounting.invoice.deleted
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.invoice.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/invoices/123456ASDF
                entity_type: invoice
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when an invoice has been deleted.
  InvoiceItemCreated:
    post:
      summary: Invoice Item Created
      operationId: invoiceItemCreated
      x-apideck-event-type: accounting.invoice_item.created
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.invoice_item.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/invoice_items/123456ASDF
                entity_type: invoice_item
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when an invoice has been item created.
  InvoiceItemUpdated:
    post:
      summary: Invoice Item Updated
      operationId: invoiceItemUpdated
      x-apideck-event-type: accounting.invoice_item.updated
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.invoice_item.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/invoice_items/123456ASDF
                entity_type: invoice_item
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when an invoice has been item updated.
  InvoiceItemDeleted:
    post:
      summary: Invoice Item Deleted
      operationId: invoiceItemDeleted
      x-apideck-event-type: accounting.invoice_item.deleted
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.invoice_item.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/invoice_items/123456ASDF
                entity_type: invoice_item
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when an invoice has been item deleted.
  LedgerAccountCreated:
    post:
      summary: Ledger Account Created
      operationId: ledgerAccountCreated
      x-apideck-event-type: accounting.ledger_account.created
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.ledger_account.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/ledger_accounts/123456ASDF
                entity_type: ledger_account
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a ledger has been account created.
  LedgerAccountUpdated:
    post:
      summary: Ledger Account Updated
      operationId: ledgerAccountUpdated
      x-apideck-event-type: accounting.ledger_account.updated
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.ledger_account.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/ledger_accounts/123456ASDF
                entity_type: ledger_account
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a ledger has been account updated.
  LedgerAccountDeleted:
    post:
      summary: Ledger Account Deleted
      operationId: ledgerAccountDeleted
      x-apideck-event-type: accounting.ledger_account.deleted
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.ledger_account.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/ledger_accounts/123456ASDF
                entity_type: ledger_account
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a ledger has been account deleted.
  TaxRateCreated:
    post:
      summary: Tax Rate Created
      operationId: taxRateCreated
      x-apideck-event-type: accounting.tax_rate.created
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.tax_rate.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/tax_rates/123456ASDF
                entity_type: tax_rate
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a tax has been rate created.
  TaxRateUpdated:
    post:
      summary: Tax Rate Updated
      operationId: taxRateUpdated
      x-apideck-event-type: accounting.tax_rate.updated
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.tax_rate.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/tax_rates/123456ASDF
                entity_type: tax_rate
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a tax has been rate updated.
  TaxRateDeleted:
    post:
      summary: Tax Rate Deleted
      operationId: taxRateDeleted
      x-apideck-event-type: accounting.tax_rate.deleted
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.tax_rate.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/tax_rates/123456ASDF
                entity_type: tax_rate
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a tax has been rate deleted.
  PurchaseOrderCreated:
    post:
      summary: Purchase Order Created
      operationId: purchaseOrderCreated
      x-apideck-event-type: accounting.purchase_order.created
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.purchase_order.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/purchase_orders/123456ASDF
                entity_type: purchase_order
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a purchase has been order created.
  PurchaseOrderDeleted:
    post:
      summary: Purchase Order Deleted
      operationId: purchaseOrderDeleted
      x-apideck-event-type: accounting.purchase_order.deleted
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.purchase_order.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/purchase_orders/123456ASDF
                entity_type: purchase_order
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a purchase has been order deleted.
  PurchaseOrderUpdated:
    post:
      summary: Purchase Order Updated
      operationId: purchaseOrderUpdated
      x-apideck-event-type: accounting.purchase_order.updated
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/AccountingEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.purchase_order.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/purchase_orders/123456ASDF
                entity_type: purchase_order
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
      description: Event broadcast when a purchase has been order updated.
  ExpenseUpdated:
    post:
      summary: Expense Updated
      description: Event broadcast when an expense has been updated.
      operationId: expenseUpdated
      x-apideck-event-type: accounting.expense.updated
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.expense.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/expenses/123456ASDF
                entity_type: expense
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            type: string
          example: accounting.expense.updated
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      security: []
  ExpenseDeleted:
    post:
      summary: Expense Deleted
      description: Event broadcast when an expense has been deleted.
      operationId: expenseDeleted
      x-apideck-event-type: accounting.expense.deleted
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.expense.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/expenses/123456ASDF
                entity_type: expense
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            type: string
          example: accounting.expense.deleted
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      security: []
  ExpenseCreated:
    post:
      summary: Expense Created
      description: Event broadcast when an expense has been created.
      operationId: expenseCreated
      x-apideck-event-type: accounting.expense.created
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.expense.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/expenses/123456ASDF
                entity_type: expense
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            type: string
          example: accounting.expense.created
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      security: []
  QuoteDeleted:
    post:
      summary: Quote Deleted
      description: Event broadcast when a quote has been deleted.
      operationId: quoteDeleted
      x-apideck-event-type: accounting.quote.deleted
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
            example:
              payload:
                event_type: accounting.quote.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/quotes/123456ASDF
                entity_type: quote
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters: []
      security: []
  QuoteCreated:
    post:
      summary: Quote Created
      description: Event broadcast when a quote has been created.
      operationId: quoteCreated
      x-apideck-event-type: accounting.quote.created
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
            example:
              payload:
                event_type: accounting.quote.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/quotes/123456ASDF
                entity_type: quote
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters: []
      security: []
  QuoteUpdated:
    post:
      summary: Quote Updated
      description: Event broadcast when a quote has been updated.
      operationId: quoteUpdated
      x-apideck-event-type: accounting.quote.updated
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
            example:
              payload:
                event_type: accounting.quote.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/quotes/123456ASDF
                entity_type: quote
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters: []
      security: []
  ProjectUpdated:
    post:
      summary: Project Updated
      description: Event broadcast when a project has been updated.
      operationId: projectUpdated
      x-apideck-event-type: accounting.project.updated
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.project.updated
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/projects/123456ASDF
                entity_type: project
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters: []
      security: []
  ProjectCreated:
    post:
      summary: Project Created
      description: Event broadcast when a project has been created.
      operationId: projectCreated
      x-apideck-event-type: accounting.project.created
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.project.created
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/projects/123456ASDF
                entity_type: project
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters: []
      security: []
  ProjectDeleted:
    post:
      summary: Project Deleted
      description: Event broadcast when a project has been deleted.
      operationId: projectDeleted
      x-apideck-event-type: accounting.project.deleted
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingWebhookEvent'
            example:
              payload:
                event_type: accounting.project.deleted
                unified_api: accounting
                service_id: xero
                consumer_id: test_user_id
                event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
                entity_id: 123456ASDF
                entity_url: https://unify.apideck.com/accounting/projects/123456ASDF
                entity_type: project
                occurred_at: '2020-01-01T00:00:00.000Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      parameters: []
      security: []
