title: QuickBooks API - How to get all revenues/expenses
body: <p>I have limited experience with QuickBooks and accounting in general.</p>
  
  <p>Still, I'm building an application that will integrate with QuickBooks API.
  <a href="http://ippdocs.intuit.com/0025_QuickBooksAPI/0050_Data_Services/v2/0400_QuickBooks_Online" rel="nofollow noreferrer">http://ippdocs.intuit.com/0025_QuickBooksAPI/0050_Data_Services/v2/0400_QuickBooks_Online</a></p>
  
  <p>What I want to do is to use the QuickBooks API to import all expenses and revenues, and then allocate those to various products defined in my application to determine which products perform better.</p>
  
  <p>I don't really care if an expense was Check, Cash or Credit Card, or whether a revenue was through a Sales Receipt or Invoice payment. I'm only interested at the overall picture of all revenues/expenses.</p>
  
  <p>However, my understanding is that a revenue (or expense) can become to existence because of many reasons. It could be a payment received, an invoice issued, a direct deposit not associated to any transactions, a sales receipt, etc... It's similar for expenses, as you can see on the following QuickBooks diagram.</p>
  
  <p><img src="https://i.stack.imgur.com/litX8.png" alt="Money In, Money Out"></p>
  
  <p>I suppose I could use the API to query the various objects (Payment, Bill, etc...) and merge the expenses on one hand and the revenues on the other hand. However, I haven't found any documentation listing exactly which various objects account for a revenue VS expense.</p>
  
  <p>The other thing I'm concerned with is, I don't want to count certain revenue/expense twice. For example, there might be a Bill object and also a Bill Payment object for the same underlying bill. For example, should I take into consideration Journal Entries? I need an exact result.</p>
  
  <p>I suppose that QuickBooks online must be doing something similar to compute their own P&amp;L report , right?</p>
  
  <p>Ideally I would like to be able to compute the expenses and revenues according to both the Cash AND Accrual method.
  For example, in cash, I would not consider a bill that hasn't been paid yet, but in accrual, I would.</p>
  
  <p>Any help would be much appreciated. </p>