账户查询查询去哪里? GET /v3/company/<clientID>/query?query=<selectStatement>&minorversion=59 它是否在 <selectStatement> 中?

问题描述

我正在使用 QuickBooks Online API。

帐户对象的文档在这里https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/account

示例请求网址:

GET /v3/company/<clientID>/query?query=<selectStatement>&minorversion=59

Content type:text/plain
Production Base URL:https://quickbooks.api.intuit.com
SandBox Base URL:https://sandBox-quickbooks.api.intuit.com

示例查询

select * from Account where Metadata.CreateTime > '2014-12-31'

样品返回:

{
  "QueryResponse": {
    "startPosition": 1,"Account": [
      {
        "FullyQualifiedname": "Canadian Accounts Receivable","domain": "QBO","Name": "Canadian Accounts Receivable","Classification": "Asset","AccountSubType": "AccountsReceivable","CurrencyRef": {
          "name": "United States Dollar","value": "USD"
        },"CurrentBalanceWithSubAccounts": 0,"sparse": false,"MetaData": {
          "CreateTime": "2015-06-23T09:38:18-07:00","LastUpdatedTime": "2015-06-23T09:38:18-07:00"
        },"AccountType": "Accounts Receivable","CurrentBalance": 0,"Active": true,"SyncToken": "0","Id": "92","SubAccount": false
      },{
        "FullyQualifiedname": "MyClients","Name": "MyClients","MetaData": {
          "CreateTime": "2015-07-13T12:34:47-07:00","LastUpdatedTime": "2015-07-13T12:34:47-07:00"
        },"Id": "93",{
        "FullyQualifiedname": "MyJobs","Name": "MyJobs","MetaData": {
          "CreateTime": "2015-01-13T10:29:27-08:00","LastUpdatedTime": "2015-01-13T10:29:27-08:00"
        },"Id": "91","SubAccount": false
      }
    ],"maxResults": 3
  },"time": "2015-07-13T12:35:57.651-07:00"
}

在示例请求 URL 中,我需要确定要在“selectStatement”中输入什么内容

在这里找到了其他文档:
https://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/data-queries

解决方法

您有一个示例,说明在您的帖子中为 selectStatement 放置的内容:

select * from Account where Metadata.CreateTime > '2014-12-31'

例如:

/v3/company/<clientID>/query?query=select * from Account where Metadata.CreateTime > '2014-12-31'&minorversion=59