Skip to main content

Post Query with Notification

Zuora
  • 日本語のコンテンツは機械翻訳されており、補助的な参照を目的としています。機械翻訳の精度は保証できません。英語版が正となります。また、現時点では検索機能は日本語での検索をサポートしていません。翻訳に関するフィードバックについては、docs@zuora.comに送信してください。

Post Query with Notification

Use the Submit an aggregate query job API operation to submit an aggregate query with a request for the user to be notified once the job is complete. The user must provide their own implemented URL, which will be called by AQuA once the job has completed.

Callout notifications that you configure through the Zuora user Interface have higher precedence than callout notifications that you specify in AQuA queries.

If you submit an AQuA query with notifyUrl specified, the value of notifyUrl will be ignored if your organization has already configured a callout notification through the Zuora user interface.

The following section provides a JSON example to use this API operation.

HTTP request:

POST https://www.zuora.com/apps/api/batch-query/

POST https://apisandbox.zuora.com/apps/api/batch-query/

JSON request:

01{
02    "format": "csv",
03    "version": "1.1",
04    "name": "Example",
05    "encrypted": "none",
06    "partner": "salesforce",
07    "project": "00170000011K3Ub",
08    "notifyUrl": "https://hookb.in/Kb88lR8N?jobId=${JOBID}&status=${STATUS}",
09    "queries": [
10        {
11            "name": "Account",
12            "query": "select Id,CreditBalance,Name,Balance,TaxExemptStatus,AutoPay,Currency,PaymentGateway,PaymentTerm,SalesRepName,TaxExemptIssuingJurisdiction,TaxExemptEffectiveDate,TaxExemptExpirationDate,TaxExemptCertificateType,LastInvoiceDate,Status,TotalInvoiceBalance,CreatedDate,UpdatedDate, ParentId, CustomerServiceRepName, BillToContact.Id, SoldToContact.Id  from  Account",
13            "type": "zoqlexport",
14            "deleted": {
15                "column": "Deleted",
16                "format": "Boolean"
17            }
18        }
19    ]
20}

JSON response:

01{
02    "batches": [
03        {
04            "deleted": {
05                "column": "Deleted",
06                "format": "Boolean"
07            },
08            "full": true,
09            "name": "Account",
10            "query": "select Id,CreditBalance,Name,Balance,TaxExemptStatus,AutoPay,Currency,
11            PaymentGateway,PaymentTerm,SalesRepName,TaxExemptIssuingJurisdiction,TaxExemptEffectiveDate,
12            TaxExemptExpirationDate,TaxExemptCertificateType,LastInvoiceDate,Status,TotalInvoiceBalance,
13            CreatedDate,UpdatedDate, ParentId, CustomerServiceRepName, BillToContact.Id,
14            SoldToContact.Id  from  Account",
15            "status": "pending",
16            "recordCount": 0,
17            "apiVersion": "60.0",
18            "batchType": "zoqlexport",
19            "batchId": "402881824835bb2a0148450c7fca02f9"
20        }
21    ],
22    "project": "00170000011K3Ub",
23    "partner": "salesforce",
24    "notifyUrl": "https://hookb.in/Kb88lR8N&jobId=${JOBID}&status=${STATUS}",
25    "name": "Example",
26    "id": "402881824835bb2a0148450c7fc502f8",
27    "version": "1.1",
28    "format": "CSV",
29    "status": "submitted",
30    "encrypted": "none"
31}