Using the v3 QBO API (part of the Intuit Partner Platform), I'm querying an invoice that includes sales tax, expressed as follows:
"TxnTaxDetail": {
"TxnTaxCodeRef": {
"value": "3"
},
"TotalTax": 35.13,
"TaxLine": [
{
"DetailType": "TaxLineDetail",
"Amount": 35.13,
"TaxLineDetail": {
"NetAmountTaxable": 395.87,
"TaxPercent": 8.875,
"TaxRateRef": {
"value": "4"
},
"PercentBased": true
}
}
]
},
When I run a balance sheet (using the web UI), I can clearly see which sale tax payable account the $35.15 hits, but I can't figure out how to access that information through the API and I really want to.
I try following the trail of business objects, hoping to find it that way, beginning with the TaxRate, which, when Querying Id 2, turns out to be:
{
"RateValue": 8.875,
"AgencyRef": {
"value": "2"
},
"domain": "QBO",
"Name": "NYC Sales Tax",
"SyncToken": "0",
"SpecialTaxType": "NONE",
"DisplayType": "ReadOnly",
"sparse": false,
"Active": true,
"MetaData": {
"CreateTime": "2013-02-04T15:18:23-08:00",
"LastUpdatedTime": "2013-02-04T15:18:23-08:00"
},
"Id": "4",
"Description": "Sales Tax"
}
I gather that maybe AgencyRef has the answer to my question, so querying TaxAgency 2, I get:
{
"SyncToken": "0",
"domain": "QBO",
"DisplayName": "New York State Taxes and Finance",
"TaxTrackedOnSales": true,
"TaxTrackedOnPurchases": false,
"sparse": false,
"Id": "2",
"MetaData": {
"CreateTime": "2013-02-04T15:18:22-08:00",
"LastUpdatedTime": "2013-02-04T15:18:22-08:00"
}
}
Now this is where I feel I'm at a dead end.
Taking a different tack, I looked at the TxnTaxDetail's TaxCode Ref, but I didn't find any help from TaxCode 3 either:
{
"SyncToken": "0",
"domain": "QBO",
"TaxGroup": true,
"Name": "NYC Sales Tax",
"Taxable": true,
"PurchaseTaxRateList": {
"TaxRateDetail": []
},
"sparse": false,
"Active": true,
"Description": "NYC Sales Tax",
"MetaData": {
"CreateTime": "2013-02-04T15:18:22-08:00",
"LastUpdatedTime": "2013-02-04T15:18:22-08:00"
},
"Id": "3",
"SalesTaxRateList": {
"TaxRateDetail": [
{
"TaxTypeApplicable": "TaxOnAmount",
"TaxRateRef": {
"name": "NYC Sales Tax",
"value": "4"
},
"TaxOrder": 0
}
]
}
}
What am I missing here? Is it really not possible to access through the API the information of which Account the sales tax portion of this transaction hits?