Ibrahim
Ibrahim

Reputation: 1471

Quickbooks Online - Cannot get LinkedTxn detail

I created an Expense record and linked to an Invoice. When i import Invoice object through API, it has linked transaction as below.

"LinkedTxn":[{
     "TxnId":"1356",               //Id of Expense
     "TxnType":"ReimburseCharge"   //Type showing as ReimburseCharge
}]

In Quickbooks online docs, it is mentiond as

Links to expenses incurred on behalf of the customer are returned in the response with LinkedTxn.TxnType set to ReimbCharge, ChargeCredit or StatementCharge corresponding to billable customer expenses of type Cash, Delayed Credit, and Delayed Charge, respectively. Links to these types of transactions are established within the QuickBooks UI, only, and are available as read-only at the API level.

Use LinkedTxn.TxnLineId as the ID in a separate read request for the specific resource to retrieve details of the linked object.

In response it is showing TxnType as ReimburseCharge, but I didn't see any object like that in api explorer or docs. I don't know what type of object to request with id. I tried with Purchase, PurchaseOrder, Bill etc. but not of the request returned expected expense record.

Please help on how to access this Expense record with linked transaction id through api.

Invoice JSON: Invoice line with description Printing paper is the expense linked in this invoice.

{
   "Invoice":{
      "Id":"1358",
      "LinkedTxn":[
         {
            "TxnId":"1356",
            "TxnType":"ReimburseCharge"
         }
      ],
      "Line":[
         {
            "Id":"1",
            "LineNum":1,
            "Description":"Printing paper",
            "DetailType":"DescriptionOnly",
            "DescriptionLineDetail":{

            }
         },
         {
            "Id":"3",
            "LineNum":2,
            "Description":"Magazine Monthly",
            "Amount":100.0,
            "DetailType":"SalesItemLineDetail",
            "SalesItemLineDetail":{
               "ItemRef":{
                  "value":"19",
                  "name":"Publications:Magazine Monthly"
               },
               "UnitPrice":100,
               "Qty":1,
               "TaxCodeRef":{
                  "value":"NON"
               }
            }
         },
         {
            "Amount":250.0,
            "DetailType":"SubTotalLineDetail",
            "SubTotalLineDetail":{

            }
         }
      ],
      "Balance":250.0
   }
}

Quickbooks Online Image

Upvotes: 0

Views: 744

Answers (1)

A Kaptur
A Kaptur

Reputation: 317

The docs are a little confusing on this point - unfortunately, the second paragraph

Use LinkedTxn.TxnLineId as the ID in a separate read request for the specific resource to retrieve details of the linked object.

is a generic paragraph that appears for docs on every Ref type, but shouldn't appear here. It's impossible to access these transactions via the API. More detail available here.

Upvotes: 1

Related Questions