Skip to main content

query()

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

  • US Data Center Customers: The SOAP API is no longer under active development. The legacy SOAP calls still function, but are now also available in REST.

    EU Data Center Customers: The SOAP API is not available. Please use the REST API.

    APAC Data Center Customers: The SOAP API is not available. Please use the REST API.

    Going forward, new features will only be available through the REST API. We strongly recommend that all integrations are done using the REST API.

    You can find the REST API documentation at https://www.zuora.com/developer/.

query()

The query call sends a query expression by specifying the object to query, the fields to retrieve from that object, and any filters to determine whether a given object should be queried.  This SOAP API reference describes this call.

Usage

Zuora has a SQL-like query language you can use to construct those queries, passing them through the queryString.

Once the call is made, the API executes the query against the specified object and returns a query response object to your application. Your application can then iterate through rows in the query response to retrieve information.

The < character in query calls

The character, <, indicates to the Zuora API the beginning mark of an element. Unless that is your intent, substitute these characters for the < character: &lt;

The character, >, does not require substitution.

Example request

1select id,accountId,autorenew,initialTerm,renewalTerm,termEndDate,termStartDate from Subscription where accountId='2c92a0gc4030cg1b01392af7533f48a6' and status='active' and subscriptionStartDate &lt;= '2012-08-15' and subscriptionEndDate >= '2012-08-15='

Example response

1<ns2:Id>2c92a0fb3929bf1a01392af6426748a9</ns2:Id>
2<ns2:AccountId>2c92a0fb3929bf1a01392af6422f48a6</ns2:AccountId>
3<ns2:AutoRenew>true</ns2:AutoRenew>
4<ns2:InitialTerm>1</ns2:InitialTerm>
5<ns2:RenewalTerm>1</ns2:RenewalTerm>
6<ns2:TermEndDate>2012-09-15</ns2:TermEndDate>
7<ns2:TermStartDate>2012-08-15</ns2:TermStartDate>

Limitations

This call has the following limitations:

  • All keywords must be in lower case.
  • The number of records returned is limited to 2000 records (100 records for WSDL v5 and earlier).