> ## Documentation Index
> Fetch the complete documentation index at: https://getlago.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Expansions

> Use the expands[] query parameter in the Lago API to include related objects, such as rates on a rate card or applied rate cards on a contract.

The API returns related objects only when you ask for them. Pass one or more `expands[]` query parameters on a retrieve endpoint to include them in the response.

```bash theme={"dark"}
curl --location --request GET "$LAGO_URL/api/v2/contracts/contract_example?expands[]=applied_rate_cards&expands[]=plan" \
  --header "Authorization: Bearer $API_KEY"
```

Only the documented values are supported. A value that an endpoint does not support returns `400`. Endpoints without expansions, such as taxes, also return `400` for any non-empty `expands[]`.

## Supported expansions

| Endpoint | `expands[]` values |
| - | - |
| [Retrieve product](https://getlago.com/docs/v2/api-reference/products/retrieve.md) | `product_category`, `billable_metric` |
| [Retrieve rate card](https://getlago.com/docs/v2/api-reference/rate-cards/retrieve.md) | `active_rate`, `taxes`, `rates`, `product`, `product_filter` |
| [Retrieve plan](https://getlago.com/docs/v2/api-reference/plans/retrieve.md) | `taxes` |
| [Retrieve contract](https://getlago.com/docs/v2/api-reference/contracts/retrieve.md) | `applied_rate_cards`, `plan`, `customer`, `invoice_custom_sections` |
| [Retrieve customer](https://getlago.com/docs/v2/api-reference/customers/retrieve.md) | `metadata`, `taxes`, `integration_customers` |
| [Retrieve billable metric](https://getlago.com/docs/v2/api-reference/billable-metrics/retrieve.md) | `filters` |
| [Retrieve billing entity](https://getlago.com/docs/v2/api-reference/billing-entities/retrieve.md) | `taxes`, `selected_invoice_custom_sections` |
| [Retrieve invoice](https://getlago.com/docs/v2/api-reference/invoices/retrieve.md) | `fees`, `applied_taxes`, `customer`, `contracts`, `applied_invoice_custom_sections`, `error_details` |
| [Retrieve fee](https://getlago.com/docs/v2/api-reference/fees/retrieve.md) | `applied_taxes`, `invoice`, `product`, `product_filter`, `rate_card`, `rate`, `contract`, `customer` |
| [Retrieve credit note](https://getlago.com/docs/v2/api-reference/credit-notes/retrieve.md) | `items`, `applied_taxes`, `customer`, `error_details`, `metadata` |
| [Retrieve payment receipt](https://getlago.com/docs/v2/api-reference/payment-receipts/retrieve.md) | `payment` |

Each endpoint page is the source of truth for its accepted values. `active_rate` can be `null` when no rate is effective yet.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.