Upgrading Node.js SDK to API v2
How to upgrade conductor-node
to use our new QuickBooks Desktop API v2
We’re excited to announce a major update to conductor-node
that brings full support for our new QuickBooks Desktop API v2.0. This new version introduces significant improvements in usability, consistency, and functionality.
While the old version of conductor-node
will continue to work, it will not
receive any further updates. We strongly recommend upgrading to take advantage
of the new features and improvements.
Key improvements
Our new QuickBooks Desktop API v2.0 has been completely redesigned from the ground up. We’ve carefully chosen every field name, parameter, and method description to be significantly more intuitive and clearer than QuickBooks’s original documentation. The API structure has been simplified while maintaining full functionality.
Major improvements include:
- Improved parameter and fields names,
- Completely rewritten inline documentation
- Automatic pagination support
- Automatic retries with exponential backoff
- Configurable timeouts
- New methods like
.retrieve()
and.delete()
- All fields included in responses
- Consistent array handling
How to upgrade
For now, we ask that you install the new SDK from a git repo instead of npm because we are not ready to prompt all existing users of our npm package to upgrade. Any new Conductor users should absolutely use this new version!
⚠️ Breaking changes
While this update includes several breaking changes, they only affect naming conventions and API structure. Your core QuickBooks business logic remains unchanged. We’ve simply made the interface cleaner, more intuitive, and more robust, while adding new features like automatic pagination and retries.
1. Constructor
Old:
New: You can now automatically load your secret key from the CONDUCTOR_SECRET_KEY
environment variable (or pass it to the constructor as an argument like before):
2. Resource names
Old: Singular resource names.
New: Plural resource names and clearer naming.
3. Method names
Old: Odd naming conventions.
New: Intuitive naming following REST conventions.
4. End-user ID parameter
Old: Required as its own argument.
New: Required as a conductorEndUserId
parameter in the parameters object.
5. Request parameters
All request parameters are now in camelCase and have been renamed for clarity and consistency. Most of the changes are straightforward that you can find using autocomplete in your IDE or checking the APIs in the sidebar.
Old: Odd naming conventions.
New: camelCase and clearer naming.
6. Response field names
All output fields are now in camelCase and have been renamed for clarity and consistency. Most of the changes are straightforward that you can find using autocomplete in your IDE or checking the APIs in the sidebar.
Here are some key renamed fields:
TxnID
andListID
→id
TimeCreated
andTimeModified
→createdAt
andupdatedAt
EditSequence
→revisionNumber
*Ref
fields (e.g.,CustomerRef
) → simplified (e.g.,customer
)
Old: Odd naming conventions.
New: camelCase and clearer naming.
7. Query/list request structure
Old: Odd naming conventions and complex structure.
New: Significantly simplified structure and clearer naming.
8. Query/list response structure
To support automatic pagination, the query/list method now returns results in an object wrapper with properties for pagination metadata.
Old: Returns an array of results directly.
New: Returns results in an object wrapper with properties for pagination metadata.
9. Enforced limits
Previously, the API would return all matching items by default. This could lead to performance issues when unintentionally retrieving thousands of records, potentially causing long response times, overloading QuickBooks Desktop, and consuming excessive memory.
To prevent these issues, we now limit responses to a maximum of 150 items by default. This limit was carefully determined through extensive testing across different scenarios and system configurations to optimize performance while avoiding timeouts and resource constraints.
With the new automatic pagination, you can efficiently retrieve all records when needed, without worrying about these performance concerns.
10. Consistent arrays
Fields that can have multiple values are now always arrays, even when there’s only one item:
New features
Automatic pagination
You can now easily paginate through all results. See the automatic pagination section of the README for more details.
Automatic retries with exponential backoff
Intelligently retries requests, but only those requests that can potentially succeed when retried (such as network errors).
New retrieve
and delete
methods
All objects now have a retrieve
method and all transaction objects have a delete
method.
Complete field returns
The new API now returns a consistent response structure with all possible fields, making it easier to work with the data. Fields that have no value are explicitly set to null
rather than being omitted, and empty array fields return []
instead of being excluded. This means you can reliably access any field without checking if it exists first, and array operations will work consistently without special handling for missing fields.
Missing QuickBooks Desktop types
Several obscure QuickBooks Desktop types/endpoints from the previous version
of conductor-node
are not yet available in the new SDK. You can verify this
by examining the list of object types in the sidebar. Please contact
support if you need a specific type, and we’ll
add it to the next release.
For more detailed information about the SDK, please check our GitHub repository.