1
votes

I have an ETL set up to pull SalesReceipts, Invoices, and CreditMemos into our own data warehouse. However, if a transaction in the past has been voided/deleted this will cause our numbers to be off. I have not found a way to get a list of invalidated transactions and I'd prefer not to have to pull all transactions for all time for each invocation of the ETL.

More details:
Our data is in QBO and I am using the Java API provided by Intuit.

I have reviewed the API (both the online endpoint API as well as the Java API) and I have not found much to work with.

Here is an example of a query for Invoice data:

<page loop>
{
    Invoice invoice = GenerateQuery.createQueryEntity(Invoice.class);
    String query = select($(invoice)).skip(page * PAGE_SIZE).take(PAGE_SIZE).generate();
    QueryResult result = dataService.executeQuery(query);
    for (IEntity entity : result.getEntities())
    {
        Transaction t = (Transaction) entity;
        System.out.println(t.getStatus());
    }
}

However I never encounter any of our cancelled/voided/deleted transactions with this query and the transaction status may not be used in the where filter.

EDIT #2 I believe I have found what I need in the Change Data Capture service. https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/020_key_concepts/00600_changedata_operation

Some code:

List<IEntity> entities = new ArrayList();
entities.add(new SalesReceipt());
entities.add(new Invoice());
entities.add(new CreditMemo());
List<CDCQueryResult> cresult = dataService.executeCDCQuery(entities, "2011-12-01T00:00:00Z");
...

This will return all transactions that have changed (modified, added, deleted) since the date specified, though what's VERY odd to me is that if I use the date string "2011-12-01T0:0:0Z" I get only transactions with the DELETED state.

For reference: "2011-12-01T00:00:00Z": all added, modified, deleted transactions. "2011-12-01T0:0:0Z": only deleted transactions.

Thanks

1
Is this for QuickBooks for WINDOWS, or QuickBooks ONLINE? What API are you using? You need to provide more details...Keith Palmer Jr.
I am seeing a similar issue with only getting deleted records when I include the timezone. I am getting correct results by dropping the timezone in the time string and making sure the results are in local (to intuit) pacific standard time.Pete Brumm

1 Answers

1
votes

Preston,
If you are using QuickBooks Desktop you need to use the QBXML SDK v13 to access transactions, if you are using QuickBooks Online you can use QBO v3 REST API.

QBO:
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services

QBD:
https://developer.intuit.com/docs/0250_qb

regards,
Jarred