# QuickBooks Desktop inventory API

Quantity on hand, on order and on sales orders for each inventory item, with average cost and value. Inventory come from the item list (qbXML `ItemQuery`). Empty when inventory is turned off in the company file.

## List inventory

`GET /v1/files/{file_id}/inventory`

List inventory. Follow `next_cursor` for the rest ([how pages work](/docs/requests-and-pagination)).

### Parameters

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `file_id` (required) | path | string | The company file id (file_...), from GET /v1/files. |
| `limit` | query | integer | Records per page, 1 to 500. Default 100. |
| `cursor` | query | string | next_cursor from the previous page. Keep the other parameters the same while paging. |
| `modified_since` | query | string | Only records changed at or after this time (ISO 8601 date-time with offset, or a date). |
| `status` | query | string: active, inactive, all | Filter by status. |
| `fields` | query | string | Comma-separated top-level fields to return (id is always included). |
| `if_queued` | query | string: error | error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in). |
| `order` | query | string: modified, id | id (default) or modified (default with modified_since). |
| `format` | query | string: json, csv | json (default) or csv. Accept: text/csv works too. |
| `flat` | query | string: 1 | 1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads). |

### Responses

| Status | Means |
| --- | --- |
| 200 | OK |
| 202 | The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then. |
| 400 | A parameter isn't valid, or the key was put in the URL. |
| 401 | No key, or the key isn't valid. |
| 404 | No such company file, record or job for this key. |
| 409 | if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in. |
| 429 | More than 60 requests a minute with this key. Retry-After says when to try again. |

## One inventory level

`GET /v1/files/{file_id}/inventory/{qb_id}`

One inventory level by its QuickBooks id.

### Parameters

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `file_id` (required) | path | string | The company file id (file_...), from GET /v1/files. |
| `qb_id` (required) | path | string | QuickBooks' id for the record (ListID or TxnID). |
| `if_queued` | query | string: error | error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in). |
| `format` | query | string: json, csv | json (default) or csv. Accept: text/csv works too. |

## Fields

Inventory fields

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The item's QuickBooks id (ListID). |
| `item` | Ref | The inventory item. |
| `quantityOnHand` | number | Quantity on hand. |
| `quantityOnOrder` | number | Quantity on open purchase orders. |
| `quantityOnSalesOrder` | number | Quantity on open sales orders. |
| `averageCost` | number | Average cost per unit. |
| `value` | number | Quantity on hand times average cost. |
| `modifiedAt` | date-time | When the record last changed. Use modified_since to read only what changed. |

`Ref` is `{ id, name }`: QuickBooks' id and full name, so reports can show names without a second request. CSV flattens each record into one row; the columns are listed in [the OpenAPI document](https://desktop-app.greatwork.company/openapi.json).

## Example

```bash
curl -H "Authorization: Bearer dbk_your_key" "https://desktop-app.greatwork.company/v1/files/file_8f2c41/inventory?limit=100"
```

```json
{
  "object": "list",
  "resource": "inventory",
  "file_id": "file_8f2c41",
  "data": [
    {
      "id": "80000050-1700000500",
      "item": {
        "id": "80000050-1700000500",
        "name": "Hardware:Joist hanger 2x8"
      },
      "quantityOnHand": 340,
      "quantityOnOrder": 500,
      "averageCost": 1.12,
      "value": 380.8
    }
  ],
  "next_cursor": null,
  "has_more": false,
  "synced_at": "2026-11-27T07:04:12-06:00",
  "as_of": "2026-11-27T07:03:58-06:00"
}
```

## About inventory

## Why stock levels have their own resource

Every invoice, bill, item receipt and inventory adjustment changes an item's quantity on hand, but QuickBooks doesn't mark the item itself as changed when that happens. Intuit's reference says so plainly: the item query can't tell you which items had their quantity moved by other transactions, and the inventory query is the one to use ([ItemInventoryQuery](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/iteminventoryquery)). So instead of trusting a change date, we re-read every inventory part, and every assembly on Premier and Enterprise, in full every 6 hours. Quantities here are as of that read; `synced_at` says when it was.

That makes this resource right for a daily stock sheet and a reorder list, and wrong for "can I sell the last one this minute". For that, look in QuickBooks.

## The four numbers

| Field | What QuickBooks counts |
| --- | --- |
| `quantityOnHand` | What is on the shelf after every posted sale, purchase and adjustment |
| `quantityOnOrder` | Open quantities on [purchase orders](/docs/api/purchase-orders) |
| `quantityOnSalesOrder` | Open quantities on [sales orders](/docs/api/sales-orders) (Premier and Enterprise) |
| `averageCost` | QuickBooks' average cost per unit |

`value` is ours: quantity on hand times average cost, rounded to the cent. Intuit points to its reports for inventory asset value, so when the number has to match the books, compare with QuickBooks' Inventory Valuation Summary. Negative quantities (sold before the purchase was entered) give a negative value here, which is usually the first thing to look for when the two disagree.

## A reorder list

```bash
GET /v1/files/file_8f2c41/inventory?status=active&format=csv
```

Add a column for what you can still promise, `quantity_on_hand - quantity_on_sales_order`, and another for what will be there once orders arrive, adding `quantity_on_order`. Rows where the second number is under your reorder point are the list. QuickBooks keeps reorder points on the item, but they aren't in this resource, so keep them in a column of your own. Names, prices and accounts for the same items come from [items](/docs/api/items) (join on `id`, which is the item's id).

Inactive items stay in this list so old stock still shows: `status=active` leaves them out and `status=inactive` lists only them.

Previous: [Journal entries](/docs/api/journal-entries) | Next: [Profit and loss report](/docs/api/reports/profit-and-loss)
