> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Query usage on an account

> This reference provides sample code of using the query() to query usage on an account.

This reference provides sample code of using the query() to query usage on an account.

## Overview

This use case queries programmatically for usages that were created in the system.

## Query usages

Use the following syntax to query usages on an account using a ZOQL statement:

```
select Id, AccountId, SourceType, UOM, Quantity, RbeStatus, StartDateTime, EndDateTime, SourceName, SubmissionDateTime from Usage where AccountId = 'someAccountId'
```

The SOAP call envelope payload should look like the following:

```
<ns1:query>
 <ns1:queryString>selectId, AccountNumber, EndDateTime, Quantity, RbeStatus, SourceName, SourceType, StartDateTime, SubmissionDateTime, UOM from Usage where AccountId = '4028e485225d1d5f0122662fd6b249c8'</ns1:queryString>
</ns1:query>
```

> **Note**
>
> The `RbeStatus` field does not indicate whether usage was processed.