> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server. # Aggregate Query API (AQuA) ## Docs - [AQuA API Introduction](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/aqua-api-introduction.md): The Aggregate Query API (AQuA) is a REST API that executes multiple ZOQL queries in a sequential order within a single read-only database transaction, supporting features like incremental data export, segment-based file export, and monitoring through AQuA Job Finder. - [Authentication](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/aqua-api-introduction/authentication.md): Learn how to authenticate to the Zuora REST API using OAuth v2.0, including creating an OAuth client, generating a bearer token, and authenticating API requests. - [Steps overview](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/aqua-api-introduction/steps-overview.md): Learn how to submit, retrieve, and view results of an aggregate query job using the Zuora API. - [Limits](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/aqua-api-introduction/limits.md): AQuA enforces limits on processing time, number of queries, and concurrent jobs, with specific restrictions on certain objects. - [AQuA: Stateless and stateful modes](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/stateless-and-stateful-modes.md): The Aggregate Query API (AQuA) offers stateless and stateful modes for executing queries, with recommendations for usage based on data extraction needs. - [Stateless and stateful modes](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/stateless-and-stateful-modes/stateless-and-stateful-modes-part-2.md): AQuA can operate in stateless and stateful modes, executing queries either sequentially or within a continuous session. - [Automatic switch between full load and incremental load](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/stateless-and-stateful-modes/automatic-switch-between-full-load-and-incremental-load.md): AQuA automatically switches between full and incremental data loads based on session identifiers and query changes. - [Time offset for AQuA stateful queries](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/stateless-and-stateful-modes/time-offset-for-aqua-stateful-queries.md): Learn how to configure a time offset for AQuA stateful queries to control the data retrieval interval. - [Examples: Data retrieval](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/stateless-and-stateful-modes/examples.md): Learn how to use AQuA queries to retrieve data from custom fields and deleted records for enhanced integration. - [AQuA API error codes](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/aqua-api-error-codes.md): Provides a comprehensive list of AQuA API error codes and messages, describing the conditions under which they occur and the recommended corrective actions. - [AQuA job finder](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/aqua-job-finder.md): The AQuA Job Finder provides access to recent AQuA requests and results within your tenant, with automatic purging of results older than 72 hours. - [Access and use the AQuA job finder](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/aqua-job-finder/access-and-use-the-aqua-job-finder.md): Learn how to access and use the AQuA Job Finder in the Zuora application to manage data integration tasks. - [Bulk data extraction from Zuora using AQuA](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua.md): This task outlines best practices for extracting data from Zuora using AQuA and loading it into an external data warehouse. - [Best practices when querying data from Zuora](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/best-practices-when-querying-data-from-zuora.md): Learn the recommended steps for querying data from Zuora using AQuA, including querying each data source individually, batching queries, filtering by updated date, using stateless queries, and extracting deleted data. - [Query each data source individually](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/query-each-data-source-individually.md): Learn how to query each data source individually by focusing on base object fields and parent object IDs to optimize performance and reconstruct relationships in an external repository. - [Filter by UpdatedDate only](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/filter-by-updateddate-only.md): Learn how to efficiently filter data using the indexed UpdatedDate column to improve query performance and avoid full table scans. - [High Water Mark Approach for AQuA Stateless Queries](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/high-water-mark-approach-for-aqua-stateless-queries.md): This article explains the high water mark approach for AQuA stateless queries, recommended for efficient bulk data extraction in Zuora. - [Extract deleted data in AQuA queries](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/extract-deleted-data-in-aqua-queries.md): Learn how to extract deleted data in AQuA queries by setting the forceExport parameter to true within the deleted section. - [Best practices when loading data into your data warehouse](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/best-practices-when-loading-data-into-your-data-warehouse.md): Learn best practices for loading data into your data warehouse, including initial extracts, incremental updates, and table management. - [Data loading steps](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/data-loading-steps.md): Follow these steps to perform a single load operation of a data source, ensuring data consistency and freshness in your data warehouse. - [Delete data from staging table](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/delete-data-from-staging-table.md): View the SQL syntax and guidelines for efficiently deleting data from the staging table using the TRUNCATE command. - [Bulk data extraction using other Zuora APIs](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/bulk-data-extraction-from-zuora-using-aqua/bulk-data-extraction-using-other-zuora-apis.md): Explains why Zuora Data Query API is not recommended for large-scale data exports and outlines Zuora's planned Bulk Query API for warehouse-level data extraction. - [Post Query](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/post-query.md): Learn how to use the Submit an aggregate query job API operation to submit aggregated ZOQL and Export ZOQL queries, with examples in JSON and cURL. - [Post query with API version](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/post-query/post-query-with-api-version.md): Learn how to use the Submit an aggregate query job API operation with the apiVersion query parameter to ensure consistent query performance. - [Post query with notification](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/post-query/post-query-with-notification.md): Learn how to use the Submit an aggregate query job API operation to submit queries with user notification upon completion. - [Post query with retrieval time](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/post-query/post-query-with-retrieval-time.md): Learn how to use the Submit an aggregate query job API operation with the incrementalTime parameter to retrieve records created or modified after a specified time in Stateful AQuA mode. - [Post query with time offset](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/post-query/post-query-with-time-offset.md): Learn how to use the Submit an aggregate query job API operation with the offset parameter to retrieve records created or updated within a specific time frame. - [Callout notification for completed AQuA jobs](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/callout-notification-for-completed-aqua-jobs.md): Learn how to configure callout notifications for completed AQuA jobs using the Zuora notification framework. - [Procedure](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/callout-notification-for-completed-aqua-jobs/procedure.md): Outlines the steps to create a callout notification, including creating a template and setting up the notification. - [Create a callout template](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/callout-notification-for-completed-aqua-jobs/create-a-callout-template.md): Learn how to create a callout template by navigating through the Extension Studio and configuring necessary settings. - [Set up a callout notification](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/callout-notification-for-completed-aqua-jobs/set-up-a-callout-notification.md): Learn how to set up a callout notification. - [Get Job Results](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/get-job-results.md): Learn how to use the Retrieve an aggregate query job API operation to obtain job results using the Job ID, and understand the limitations regarding completed AQuA jobs. - [Get results files](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/get-results-files.md): Retrieve results files using the API operation, with a maximum size of 2,047 MB, purged after 3 days. - [Get last job completed](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/get-last-job-completed.md): Learn how to use the API operation to retrieve details of the last completed aggregate query job in Zuora. - [Delete a running job](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/delete-a-running-job.md): Learn how to delete a running job using the Zuora API, including examples of HTTP requests and responses. - [File segmentation](https://zuora.ferndocs.com/docs/platform/data/aggregate-query-api-aqua/file-segmentation.md): The AQuA File Segmentation feature allows retrieval of data in multiple files, enhancing performance for large datasets. It is recommended to use stateless mode for bulk data extraction.