---
title: "Query"
method: POST
path: "/v1/action/query"
tags: ["Actions"]
---

# Query

`POST /v1/action/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.

You can use [Zuora Object Query Language](https://docs.zuora.com?resourceId=platform-zoql)(ZOQL) 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.

### Limitations

This call has the following limitations:

* All [ZOQL limitations](https://docs.zuora.com?resourceId=platform-zoql) apply.
* All ZOQL keywords must be in lower case.
* The number of records returned is limited to 2000 records.
* The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement.
* The Orders feature is not supported, which means that the objects listed in [Orders Object Model](https://docs.zuora.com?resourceId=billing-orders-object-model) are not supported.
* The Active Rating feature is not supported.
* The default WSDL version for Actions is 79. To query objects or fields according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://docs.zuora.com?resourceId=platform-soap-api-version-history).
* Fields with NULL values are not returned in the response.

## Query parameters

- `rejectUnknownFields` boolean

## Headers

- `Idempotency-Key` string
- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Track-Id` string
- `X-Zuora-WSDL-Version` string
- `Zuora-Version` string

## Request body

- ProxyActionqueryRequest
  - `conf` object — Configuration of the query result.
    - `batchSize` integer — Defines the batch size of the query result. The range is 1 - 2000 (inclusive). If a value higher than 2000 is submitted, only 2000 results are returned.
  - `queryString` string, required — [ZOQL](https://docs.zuora.com?resourceId=platform-zoql) expression that specifies the object to query, the fields to retrieve, and any filters. **Note:** When querying one time charges from ProductRatePlanCharge, you need to specify the `ChargeType` value as `One-Time` rather than `OneTime`.

## Response `200`

OK

- ProxyActionqueryResponse
  - `done` boolean — Indicates whether the returned records contain all the query results. * If the `queryLocator` field is returned, this field is set to `false`. * If no `queryLocator` field is returned, this field is set to `true`.
  - `queryLocator` string — A marker passed to QueryMore to get the next set of results. For more information, see [QueryMore](https://developer.zuora.com/api-references/api/operation/Action_POSTqueryMore/).
  - `records` ZObject[] — A list of queried results.
  - `size` integer — The number of the returned query results.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
