【问题标题】:Intuit QBO Reports API -- What's the full qzurl URL?Intuit QBO Reports API -- 什么是完整的 qzurl URL?
【发布时间】:2015-05-02 02:21:55
【问题描述】:

用于报告的 Intuit 合作伙伴平台 (IPP) QBO v3 API 的文档(例如 this one for a Balance Sheet) 指的是非常有前途的元素,称为 Quick-Zoom URL(在我链接到的文档页面底部附近讨论)。

当您运行报告时,您会得到一个类似这样(已编辑)的 href 元素:

{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'}

我要构建的完整 URL 是什么?

编辑:澄清一下,我已经能够使用 qzurl 链接运行资产负债表报告。我需要帮助的是构建和遵循快速缩放 URL 本身; 是 qzrules 的响应中的东西......我如何遵循这些?

【问题讨论】:

    标签: rest intuit-partner-platform quickbooks-online


    【解决方案1】:

    您可以使用 ApiExplorer 尝试所有 QBO V3 报告。 https://developer.intuit.com/v2/apiexplorer?apiname=V3QBO#?id=Reports

    如果以编程方式调用这些 API,请随意使用 IDG 提供的 java/C#/php SDK。

    根据文档,

    与开发密钥一起使用的沙盒基本 URL:https://sandbox-quickbooks.api.intuit.com/v3

    与生产密钥一起使用的生产基础 URL:https://quickbooks.api.intuit.com/v3​

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

    编辑添加请求 URL 和响应 [条件:qzurl=true]

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

    响应 -

    <?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>
    

    编辑 -

    在以下 BASE URL 的末尾添加 qzURL 并使用 OAuth 令牌调用此端点。

    前 -

    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

    【讨论】:

    • 我能够运行资产负债表报告,我只是无法使用包含 qzurl= 时获得的 href 属性构建(或者可能只是跟随)qrurl 链接url 中的 true。 也许我不理解它们的意义。这些是否可以在没有经过身份验证的 GET 请求的情况下访问(即由我的最终用户)?
    • 您好,请查看我更新的帖子。所有这些调用都是经过身份验证的调用,即您需要拥有有效的 OAuth 令牌才能调用此报告端点。
    • 您仍在告诉我如何让报告包含链接,我已经能够做到这一点。我无法做的是按照响应中的 href 链接进行操作。我会尝试进一步澄清我的问题。
    • 嗨 HaPsantran,很抱歉给您带来了困惑。我错过了你的qts。我明白你的意思了。我会检查并回来。谢谢
    【解决方案2】:

    假设 quickzoom url 如下-

    “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 将首先发送一个请求以了解 QZReport 支持的所有自定义属性。请求还将包含所有过滤条件或属性集。从上面的 url 请求将如下所示。 https://quickbooks.api.intuit.com/v3/company/1368908040/customize?report=QZReport&high_date=07/14/2014&group_by=Acccount

    1. 此请求的响应将是所有可用于 QZReport 或交易报告的自定义属性。

      例如:{

    reportName : "TranscationList" 参数:

    { 开始日期:””, 结束日期:“2014-07-14”, date_macro:"今天、昨天、今年......" 帐户:“1,2,3,4,”, .... }

    }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多