---
title: "Whether the QuickBooks file is new, and which Median accounts a chart push would create, map or skip (#2642)"
method: GET
path: "/accountant/companies/{customerId}/integrations/quickbooks/chart-push"
tags: ["Accountants"]
---

# Whether the QuickBooks file is new, and which Median accounts a chart push would create, map or skip (#2642)

`GET /accountant/companies/{customerId}/integrations/quickbooks/chart-push`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/integrations/quickbooks/chart-push`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

`state` is judged from the latest completed QuickBooks read. `no_inventory`: no read has completed yet. `inventory_unverified` (#2883): that read cannot be shown to hold every transaction, because for at least one transaction type (the types Median posts: JournalEntry, Purchase, Deposit, Transfer, SalesReceipt, RefundReceipt, Invoice, Bill, Payment, BillPayment, CreditMemo, VendorCredit) QuickBooks' census of the read is missing or differs from the rows the read stored; `unverifiedInventory` names each failed check, `entries` is empty and the file is never classified, with or without a cutoff. With a verified inventory and a posting cutoff, `new` means no transaction is dated before the cutoff and `established` means one is (the chart then comes from QuickBooks and a chart push is refused). The preview also runs before a posting cutoff is set (#2883): `cutoffDate` is then null, and the file is `new` only when the verified inventory holds no transaction at all (dated or undated); otherwise it is `unclassified`: the plan is still returned so the chart can be prepared and reviewed, and `transactions` lists the inventoried transactions as a warning, but nothing can be pushed until a cutoff classifies the file. Items, tax codes, tax rates and tax agencies are not transactions. `transactionCount` and `transactions` cover the latest completed read plus any newer read attempt (queued, running or failed) of the same connection, so a transaction a newer unfinished read already stored is seen; `transactions` is capped at 50, undated first and then by date, and `transactionCount` is always the total. Preparing a chart push (POST) requires a cutoff, a `new` file and no read attempt newer than the completed read. For `new` and `unclassified`, `entries` lists every active Median GL account, parents first: `create` (with the QuickBooks AccountType/AccountSubType and parent it will be created under), `map` (QuickBooks already has it: an account every new QuickBooks company has, such as Accounts Receivable, Accounts Payable or Retained Earnings, or one with the same number or name) or `skip` (already mapped, held by another batch, an internal clearing account without a balance, an ambiguous match or a type conflict), each with its reason. Read-only: it creates no cutoff, batch, journal or mapping and makes no QuickBooks call.

## Response `200`

The chart push preview

- object
  - `success` true, required
  - `data` QuickBooksChartPushPreview, required
    - `state` 'new' | 'established' | 'unclassified' | 'inventory_unverified' | 'no_inventory', required
    - `cutoffDate` string, date, nullable, required: The posting cutoff; null before one is set (#2883)
    - `sourceRunId` string, uuid, nullable, required: The latest completed QuickBooks read the state is judged from
    - `unverifiedInventory` object[], required: The failed prerequisite of `inventory_unverified` (#2883), one item per transaction type whose census does not match the rows the read stored. Empty in every other state.
      - `objectType` 'JournalEntry' | 'Purchase' | 'Deposit' | 'Transfer' | 'SalesReceipt' | 'RefundReceipt' | 'Invoice' | 'Bill' | 'Payment' | 'BillPayment' | 'CreditMemo' | 'VendorCredit', required
      - `reason` 'census_missing' | 'count_mismatch', required: `census_missing`: the read recorded no QuickBooks count for the type; `count_mismatch`: it stored a different number of rows
      - `expectedCount` integer, nullable, required: QuickBooks' count of the type during the read; null when missing
      - `storedCount` integer, required
    - `transactionCount` integer, required: Every QuickBooks transaction Median has read (latest completed read plus newer read attempts)
    - `transactions` object[], required: Those transactions, undated first and then by date, capped at 50. The warning list of an `unclassified` file (#2883).
      - `objectType` 'JournalEntry' | 'Purchase' | 'Deposit' | 'Transfer' | 'SalesReceipt' | 'RefundReceipt' | 'Invoice' | 'Bill' | 'Payment' | 'BillPayment' | 'CreditMemo' | 'VendorCredit', required
      - `txnDate` string, date, nullable, required: QuickBooks TxnDate; null when the object has none
      - `amountCents` integer, nullable, required: QuickBooks TotalAmt (Amount for a transfer) in integer minor units of `currency`; null when absent or not exactly representable
      - `currency` string, nullable, required: The object's CurrencyRef, or the entity's functional currency when QuickBooks omits it
    - `entries` object[], required
      - `glAccountId` string, uuid, required
      - `code` string, required
      - `name` string, required
      - `action` 'create' | 'map' | 'skip', required
      - `reason` string, required
      - `detail` string, required
      - `qboAccountId` string, nullable, required: The QuickBooks account a map entry maps to
      - `sourceObjectId` string, uuid, nullable, required
      - `accountType` string, required: QuickBooks AccountType Median would create it with
      - `accountSubType` string, required
      - `parentGlAccountId` string, uuid, nullable, required: Parent created by the same chart push
      - `parentQboAccountId` string, nullable, required: Parent already in QuickBooks
      - `depth` integer, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `422`: QuickBooks is not connected

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
