What you can do with the QuickBooks Online Accounting API

The QuickBooks Online Accounting API uses the REST framework. It uses standard HTTP methods and JSON for input and output.

Generally, our APIs let apps utilize most customer-facing features in QuickBooks Online.

In this guide, we’ll cover how our API works and what resources, operations, and features we support. If you’re looking for accounting info, here’s an overview of basic accounting in QuickBooks Online.

Tip: This guide covers QuickBooks Online and its APIs. It doesn’t include the APIs for payments processing or QuickBooks Desktop.

The QuickBooks Online Accounting API resource model

The QuickBooks Online Accounting API lets your apps utilize key features and data in QuickBooks Online.

Individual API entities correspond with forms, lists, and other tools in the customer-facing QuickBooks Online UI. For instance, apps can use the invoice entity to create, read, or send invoices in your users’ QuickBooks Online companies.

This model shows common entities and how they relate to customer-facing elements, such as transactions, journal entries, and transfers:

Choosing API entities to build your app

When you start building your app, decide generally what you want it to do. Then, pick the specific API entities needed to use the relevant features and data. Visit the API Explorer </app/developer/qbo/docs/api/accounting/all-entities/account>`_ to learn more about specific entities.

If you don’t want to start from scratch, you can build your app around one of workflow examples. You can use these guides as a basic foundation for your app and expand on it.

Basic API resources and resource categories

By “resources,” we mean the API entities your app can use to create or update data in QuickBooks Online. These entities correspond to data points businesses use to do their accounting in QuickBooks Online, like forms (invoices, bills receipts), accounts (bank, expense, tax, etc) or groups (lists, inventory items, etc).

Since they’re related, we may refer to both the API entity and related customer-facing data point as a “resource.” Most API entity names are based on common accounting terms. However, we may refer to them or categorize them in ways that are unique to QuickBooks.

Here are key customer-facing concepts and the corresponding API:

List entities/resources: Lists used to track individuals or accounts commonly referenced in transactions. We sometimes call list resources “name lists.”

Transaction entities/resources: Sales forms used for transactions.

Reports entities/resources: Reports used to track business metrics.

Inventory entities/resources: Inventory items and inventory management.

Journal entry: A type of record that accountants use to make corrections or major changes to a chart of accounts, such year-end adjustments or errors. Use this sparingly.

Basic operations

Visit the QuickBooks Online Accounting API Explorer to see the specific operations each entity supports. Besides standard CRUD operations, our API has a few unique operations:

Single requests

You can send single requests. The server individually processes and responds to single requests.

Query requests

You can send a query via the Intuit Developer SQL-like query language. The server returns the data in a single response or paged as needed.

Batch operations

You can call multiple API entities and perform multiple operations at once. For example, you can use a single batch request to create a new customer, update an invoice, and read an account.

Batch requests improve app performance by decreasing network round trips and increasing throughput. Learn more about batch operations.

Important: Use the batch operation for transactions. Don’t use it for list resources like customers, vendors, items, etc.

Change data capture operations

This operation returns the list of entities that have changed within a specific timeframe.

Change data capture operations are useful for apps that periodically poll QuickBooks Online companies and then refresh local copies of entity data. Learn more about the change data capture operation.

Update operations

There are two ways to update entities:

Keep in mind, you must serially perform updates and additions to list entities (customers, accounts, vendors, classes etc).

Use sparse updates instead of full updates

There are several advantages to sparse updates.

  • Prevent unintended overwrites: Apps don’t always use every field for an entity. If it does a full update and intends to only update used fields, it will unintentionally clear fields that weren’t sent. If you need to only update used fields, consider sparse updates.
  • Reduce request payload sizes: Sparse updates generally reduce payload sizes. This is especially useful for mobile apps since lower speeds and spotty connections can already impact performance. Also, many mobile users are sensitive to high data usage.
  • Facilitate future field additions: You can use sparse updates to add new fields to an entity. This acts as a “merge” for an existing entity. It lets you make changes without inadvertently clearing existing fields, which is especially important for past versions of production apps.

Making sparse updates

Sparse update operations let you update specific fields of an existing entity.

Specify the writable properties you want to update in the request body. Nothing else gets updated. Missing attributes also aren’t updated or cleared (in contrast to a full update).

In the request body, you must include the sparse="true" attribute.

Using sparse updates to clear fields

Making full updates

Full update operations update all writable attributes of an existing entity.

If a writable attribute is omitted or missing from the request body, full updates clear the field’s value and set it to NULL.

In the request body, use the id field to specify the entity you want to update.

Tip: Read-only values are ignored and replaced by defaults. No error is returned. We note read-only attributes for individual entities in the API Explorer.

Delete operations

There are two ways to delete entities:

Certain API entities only allow certain delete operations. We note the supported delete operations for individual entities in the API Explorer.

Doing soft deletes

A soft deletes simply marks an entity as inactive. It doesn’t delete the record. Instead, the entity is hidden for display purposes. References to inactive entities remain intact.

You can only soft delete list (customers, vendors, accounts, etc.) entities.

When you create a new object, it starts in an “active” state. To do a soft delete, use one of the update operations. Set the value of the active field to false in the request. This makes the entity inactive.

To make it active again, do another update and set the value back to true.

Note: If you query and don’t filter for “inactive” entities, the server only returns results for “active” entities.

Hard delete

Hard deletes permanently change data. It deletes the entire entity. Once you do a hard delete, you can’t undo it.

You can only hard delete transaction (invoices, estimates, purchase orders, sales receipts, etc) entities.

There are two ways to structure hard delete requests:

Learn more about common operations for the QuickBooks Online API.

Review QuickBooks-specific accounting use cases

As you develop your app, you’ll encounter many accounting concepts. Even if you have an accounting background, there are some workflows and concepts that are unique to QuickBooks Online.

We recommend you check out our overview of basic accounting and QuickBooks-specific accounting use cases.