Here are common IDs and data fields you may see during development. These appear frequently for various features and implementations.
This identifies a unique, individual QuickBooks Online company file. We assign realm IDs when QuickBooks Online users create their company file.
Realm IDs are specified in the URI of every API request. Here’s an example:
1 | baseURL/company/1234/account |
In this case, the realm ID is 1234.
At runtime, apps can retrieve realm IDs in the few ways:
realmId
parameter on the redirect URL passed during the OAuth 2.0 authorization request. Learn more about authorization requests.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:
1 | baseURL/company/1234/customer/2123 |
In this case, the entity ID for this Customer entity is 2123.
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:
requestid
can have a maximum of 36 characters. For each batch ID, only 10 characters are allowed when the request ID is also specified.This example scenario demonstrates why request IDs are important:
requestid.
It can determine that the subsequent request is the same.If the app hadn’t specified a request ID, the server would create a duplicate invoice with a new entity ID.
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.