Basic ID and field definitions for the QuickBooks Online Accounting API

Here are common IDs and data fields you may see during development. These appear frequently for various features and implementations.

Common fields
Common IDs
Realm ID

This identifies a unique, individual QuickBooks Online company file. We assign realm IDs when QuickBooks Online users create their company file.

Tip: Realm IDs and company IDs are the same number.

Realm IDs are specified in the URI of every API request. Here’s an example:


In this case, the realm ID is 1234.

At runtime, apps can retrieve realm IDs in the few ways:

Entity ID

This identifies individual instances of API entities such as an account, charge, or estimate. We assign this value to the entityID field.

To call entities by their entity ID, use the read operation and specify the entity ID in the URL. Use the following format and treat entity IDs as strings: baseURL/company/<realmId>/entityName/entityID.

Here’s an example:


In this case, the entity ID for this Customer entity is 2123.

Request ID

This identifies specific HTTP requests sent from apps to our servers. Request IDs let apps correlate requests and responses.

Request IDs are especially useful in cases where apps need to resend requests due to a dropped connection, or didn’t receive a response from the server.

We strongly recommend you use request IDs for requests that write, modify, or delete data. This guarantees idempotence. If our service receives another request with the same request ID, instead of performing the operation again or returning an error, it can recognize and send the same response for the original request. This prevents duplication.

Use query parameter requestid in the URI of requests to specify request IDs.

Here are a few things to keep in mind:

This example scenario demonstrates why request IDs are important:

  1. An app sends a request to create an invoice. It specifies “4957” for the request ID like this: baseURL/company/1234/invoice?requestid=4957
  2. Our service processes the request and sends a response.
  3. The app loses its connection and doesn’t receive a response.
  4. The app sends the same request again, specifying the same content and request ID.
  5. Our server already has the requestid. It can determine that the subsequent request is the same.
  6. Our server sends the same response as in step 2.
  7. The app receives the response and verifies it contains no errors.

If the app hadn’t specified a request ID, the server would create a duplicate invoice with a new entity ID.

Resource name

This is the name of the API entity, such as the account, customer, payments, or invoice entities. Learn more about QuickBooks Online Accounting API resources and entities.