The quickbooks connector reads accounting entities from one QuickBooks Online company through the query API.
| Connector name | quickbooks |
| Products | Records |
| Credentials | An Intuit app's client ID and secret and a refresh token, plus the company's realm ID |
| Scope | com.intuit.quickbooks.accounting |
What it pulls
By default, these entities: Invoice, Bill, Payment, BillPayment, Purchase, JournalEntry and Estimate. Each entity's header fields become one record, recorded under the entity's name in lower case (invoice). Its line items become separate records under <entity>_line (invoice_line), each linked to its parent by <entity>_id.
Set entities to pull a different list. Any QuickBooks entity name the query API accepts will work.
Credentials
QuickBooks access tokens expire after an hour, so scheduled runs use a refresh token.
- Create an app in the Intuit developer portal with the
com.intuit.quickbooks.accountingscope. - Authorize it for the company, for example in Intuit's OAuth playground, and note the refresh token and the realm ID (the company ID).
- Give the SDK
clientId,clientSecret,refreshTokenandrealmId.
When Intuit issues a new refresh token, the SDK saves it so the next run still works. You can pass a short-lived accessToken instead for a one-off run.
Connect
datayield connect quickbooks -o realmId=<realm id> -o clientId=<client id> \
-o clientSecret=env:QBO_CLIENT_SECRET -o refreshToken=env:QBO_REFRESH_TOKENSecret options passed directly are saved to ~/.datayield/credentials. Values written as env:NAME are read from the environment at run time, which suits CI. See CLI reference.
Options
| Option | Required | Meaning |
|---|---|---|
realmId |
yes | The company ID |
clientId, clientSecret, refreshToken |
for scheduled runs | The app's credentials. The secret and the refresh token are stored as secrets. |
accessToken |
instead of the above | A current access token, for a one-off run |
environment |
no | production (default) or sandbox |
entities |
no | Entity names to query |
minorVersion |
no | The API minor version. Defaults to 75. |
New records on each run
Each entity is queried for rows whose MetaData.LastUpdatedTime falls between the last successful run and now, so edited transactions are sent again with their new values.