# Query monthly bills and usage line items

View generated monthly bills or query aggregated usage line items for a posting period with existing usage. These are separate queries: line items do not require a generated monthly bill.

## Prerequisites

Prepare a valid [personal access token](../../../../guides/billing/credentials.md) for the user who owns the billing account. Follow [Query accounts and billing settings](accounts.md) to obtain the target account ID. For service URLs and authentication, see [Service URLs and authentication](../../../../reference/api/genesis/index.md#service-urls-and-authentication).

## Call sequence

1. To view generated bills, list monthly bills. The list is empty when no bills exist.
2. To analyze usage for a posting period, first [list rated usage records](../../../../reference/api/genesis/billing/usage/records.md#billing-period-selection) and select a posting period with existing usage for the target account.
3. Use that account ID and posting period to list monthly bill usage line items, choosing the grouping dimension as needed.

## API operations

| Task | API operation | When to use or what to verify |
| --- | --- | --- |
| View generated bills | [List monthly bills](../../../../reference/api/genesis/billing/bills/list.md) | Query existing monthly bills for the account. |
| Analyze usage for a posting period | [List monthly bill usage line items](../../../../reference/api/genesis/billing/bills/line-items.md) | Query aggregated line items for a posting period with existing usage. |

## Confirm the result

Check the posting period in [List monthly bill usage line items](../../../../reference/api/genesis/billing/bills/line-items.md), then inspect usage and charges by group. An empty monthly bill list does not mean that the account has no rated usage.

## Limitations and notes

Do not substitute the current month for the record's actual posting period, or treat the presence of line items as proof that a monthly bill has been generated. The bill list and line items support different filters; follow their respective action pages.
