HaPsantran
HaPsantran

Reputation: 6247

Intuit QBO Reports API -- What's the full qzurl URL?

The documentation for the Intuit Partner Platform (IPP) QBO v3 API for reports (such as this one for a Balance Sheet) refers to very promising-looking elements called Quick-Zoom URLs (discussed near the bottom of the doc page I linked to).

When you run the report, you get an href element like this (redacted) one:

{u'href': u'ProfitAndLossDetail?token=PANDL_DET&parenttoken=PANDL&crit=accounttype%3D10..14%3Bhigh_date%3D03%2F31%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C3%2C8%2C20%2C19%2C10%2C36%2C24%2C6%2C21%2C34%2C15%2C193%2C51%2C32%2C26%2C33163%2C77%2C62%2%2C86%2C107%2C60%2C79%2C166%%2C82%2C186%2C108%2C54%2C190%2C101%2C95%2C136%2C71%2C64%3Blow_date%3D01%2F01%2F2015%000740743&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName%2CKlass%2FOrderName', u'value': u'53.90'}

What's the full URL I'd construct to actually follow the link?

EDIT: To clarify, I am already able to run the balance sheet report with the qzurl links. What I need help with is building and following the Quick Zoom URLs themselves; the things in the response that are the qzruls...how do I follow those?

Upvotes: 1

Views: 346

Answers (2)

Manas Mukherjee
Manas Mukherjee

Reputation: 5340

You can try all QBO V3 Reports using ApiExplorer. https://developer.intuit.com/v2/apiexplorer?apiname=V3QBO#?id=Reports

If call these APIs programmatically please feel free to use IDG provided java/C#/php SDKs.

According docs,

Sandbox Base URL to use with development keys: https://sandbox-quickbooks.api.intuit.com/v3

Production Base URL to use with production keys: https://quickbooks.api.intuit.com/v3

Operation: GET /company/companyId/reports/BalanceSheet?name=value[&...]

Edit Adding Request URL and response [ condition : qzurl=true ]

Request URI : https://quickbooks.api.intuit.com/v3/company/1368908040/reports/BalanceSheet?qzurl=true&requestid=3434534&minorversion=1&

Response -

<?xml version="1.0" encoding="UTF-8"?>
<Report xmlns="http://schema.intuit.com/finance/v3">
   <Header>
      <Time>2015-05-04T14:28:14-07:00</Time>
      <ReportName>BalanceSheet</ReportName>
      <ReportBasis>Accrual</ReportBasis>
      <StartPeriod>2015-01-01</StartPeriod>
      <EndPeriod>2015-05-05</EndPeriod>
      <SummarizeColumnsBy>Total</SummarizeColumnsBy>
      <Currency>INR</Currency>
      <Option>
         <Name>AccountingStandard</Name>
         <Value>IFRS</Value>
      </Option>
      <Option>
         <Name>NoReportData</Name>
         <Value>false</Value>
      </Option>
   </Header>
   <Columns>
      <Column>
         <ColTitle />
         <ColType>Account</ColType>
      </Column>
      <Column>
         <ColTitle>Total</ColTitle>
         <ColType>Money</ColType>
      </Column>
   </Columns>
   <Rows>
      <Row type="Section" group="TotalAssets">
         <Header>
            <ColData value="Assets" />
            <ColData value="" />
         </Header>
         <Rows>
            <Row type="Section" group="OtherCurrentAssets">
               <Header>
                  <ColData value="Current Assets" />
                  <ColData value="" />
               </Header>
               <Rows>
                  <Row type="Data">
                     <ColData value="Inventory Asset" id="83" />
                     <ColData value="0.00" href="QZReport?token=GENERIC_QZREPORT&amp;crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C83%3Blow_date%3D01%2F01%2F2015&amp;parenttoken=BAL_SHEET&amp;cumulative=yes&amp;groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
                  </Row>
                  <Row type="Section" group="AR">
                     <Header>
                        <ColData value="Accounts receivable (Debtors)" />
                        <ColData value="" />
                     </Header>
                     <Rows>
                        <Row type="Data">
                           <ColData value="Accounts Receivable (Debtors)" id="86" />
                           <ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&amp;crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C86%3Blow_date%3D01%2F01%2F2015&amp;parenttoken=BAL_SHEET&amp;cumulative=yes&amp;groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
                        </Row>
                     </Rows>
                     <Summary>
                        <ColData value="Total Accounts receivable (Debtors)" />
                        <ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&amp;crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D86%3Blow_date%3D01%2F01%2F2015&amp;parenttoken=BAL_SHEET&amp;cumulative=yes&amp;groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
                     </Summary>
                  </Row>
               </Rows>
               <Summary>
                  <ColData value="Total Current Assets" />
                  <ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&amp;crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D78%2C66%2C83%2C12%2C79%2C4%2C59%2C85%2C7%2C86%3Blow_date%3D01%2F01%2F2015&amp;parenttoken=BAL_SHEET&amp;cumulative=yes&amp;groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
               </Summary>
            </Row>
         </Rows>
         <Summary>
            <ColData value="Total Assets" />
            <ColData value="4299.00" href="QZReport?token=GENERIC_QZREPORT&amp;crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D78%2C66%2C83%2C12%2C79%2C4%2C59%2C85%2C7%2C86%2C5%2C6%2C8%2C10%2C11%2C13%3Blow_date%3D01%2F01%2F2015&amp;parenttoken=BAL_SHEET&amp;cumulative=yes&amp;groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
         </Summary>
      </Row>
      <Row type="Section" group="TotalLiabilitiesAndEquity">
         <Header>
            <ColData value="Liabilities and Equity" />
            <ColData value="" />
         </Header>
         <Rows>
            <Row type="Section" group="Equity">
               <Header>
                  <ColData value="Equity" />
                  <ColData value="" />
               </Header>
               <Rows>
                  <Row type="Data">
                     <ColData value="Opening Balance Equity" id="84" />
                     <ColData value="0.00" href="QZReport?token=GENERIC_QZREPORT&amp;crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C84%3Blow_date%3D01%2F01%2F2015&amp;parenttoken=BAL_SHEET&amp;cumulative=yes&amp;groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
                  </Row>
                  <Row type="Data">
                     <ColData value="Retained Earnings" id="2" />
                     <ColData value="" />
                  </Row>
                  <Row type="Data" group="NetIncome">
                     <ColData value="Profit for the year" />
                     <ColData value="4299.00" href="ProfitAndLoss?token=PANDL&amp;parenttoken=BAL_SHEET&amp;crit=high_date%3D05%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3D*%3Blow_date%3D01%2F01%2F2015&amp;cumulative=yes&amp;groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName" />
                  </Row>
               </Rows>
               <Summary>
                  <ColData value="Total Equity" />
                  <ColData value="4299.00" />
               </Summary>
            </Row>
         </Rows>
         <Summary>
            <ColData value="Total Liabilities and Equity" />
            <ColData value="4299.00" />
         </Summary>
      </Row>
   </Rows>
</Report>

Edit -

Add the qzURL at then end of the following BASE URL and use OAuth tokens to call this endpoint.

For ex -

https://quickbooks.api.intuit.com/v3/company//reports/QZReport?token=GENERIC_QZREPORT&crit=high_date%3D07%2F05%2F2015%3Bnopost%3Dfalse%3Baccount%3Dmx%2C86%3Blow_date%3D01%2F01%2F2015&parenttoken=BAL_SHEET&cumulative=yes&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName

Upvotes: 1

nimisha shrivastava
nimisha shrivastava

Reputation: 2367

Assume the quickzoom url will be as follows-

"QZReport?token=GENERIC_QZREPORT&crit=high_date%3D07%2F14%2F2014%3Bnopost%3Dfalse%3Baccount%3Dmx%2C41%3Blow_date%3D01%2F01%2F2014&groupby=%28Account%2FAccountTypeID%2CAccount%2FOrderName"

1.Client will first send a request to know all the customization attributes supported for a QZReport .Request will also contain all the filtering criteria or attrobutes set.From above url the request will look like this. https://quickbooks.api.intuit.com/v3/company/1368908040/customize?report=QZReport&high_date=07/14/2014&group_by=Acccount

  1. Response of this request will be all customization attributes available for the QZReport or transaction report .

    eg:{

reportName : "TranscationList" params:

{ start_date:"", end_date:"2014-07-14", date_macro:"Today,YesterDay,ThisYear......" account:"1,2,3,4,", .... }

}

Upvotes: 0

Related Questions