# Getting started

- [API specification](https://docs.commercelayer.io/metrics/getting-started/api-specification.md): Basic info about endpoints and access tokens, request types and headers, payload and response structure
- [Queries](https://docs.commercelayer.io/metrics/getting-started/queries.md): All the available Commerce Layer Metrics API query types and the supported operators
- [Breakdown](https://docs.commercelayer.io/metrics/getting-started/queries/breakdown.md): How to perform a breakdown query and how it works
- [Date breakdown](https://docs.commercelayer.io/metrics/getting-started/queries/date-breakdown.md): How to perform a date breakdown query and how it works
- [Stats](https://docs.commercelayer.io/metrics/getting-started/queries/stats.md): How to perform a stats query and how it works
- [Search](https://docs.commercelayer.io/metrics/getting-started/queries/search.md): How to perform a search query and how it works
- [Export](https://docs.commercelayer.io/metrics/getting-started/queries/export.md): How to perform an export query and how it works
- [Filters](https://docs.commercelayer.io/metrics/getting-started/filters.md): How you can filter the query results by date or any other available field
- [Analysis](https://docs.commercelayer.io/metrics/getting-started/analysis.md): All the available Commerce Layer Metrics API helper endpoints
- [FBT](https://docs.commercelayer.io/metrics/getting-started/analysis/fbt.md): How to perform an FBT query and how it works
- [Errors](https://docs.commercelayer.io/metrics/getting-started/errors.md): The complete list of response codes you can get, how the errors object is structured, and all the information about rate limits
- [Use cases](https://docs.commercelayer.io/metrics/getting-started/use-cases.md): A list of the most common application scenarios of Commerce Layer Metrics API
- [Orders by currency](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-by-currency.md): How to use the Metrics API to get the total number of orders of your organization, grouped by different currencies
- [Orders by status and payment status](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-by-status-and-payment-status.md): How to use the Metrics API to get the total number of orders of your organization, grouped by their status and the related payment status
- [Orders by repeat customer](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-by-repeat-customer.md): How to use the Metrics API to get the total number of orders of your organization, grouped by customers that bought from you more than once
- [Orders by bundle](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-by-bundle.md): How to use the Metrics API to get the total number of orders containing a bundle, grouped by  the bundle name
- [Orders by shipment status and shipping method name](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-by-shipment-status-and-shipping-method-name.md): How to use the Metrics API to get the total number of orders of your organization, grouped by the associated shipment status and the related shipping method name
- [Orders paid with gift cards](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-paid-with-gift-cards.md): How to use the Metrics API to get the total number of orders that were paid using a gift card
- [Orders associated with a specific promotion](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-associated-with-a-specific-promotion.md): How to use the Metrics API to get the total number of orders that triggered a specific promotion
- [Number of products per order by country](https://docs.commercelayer.io/metrics/getting-started/use-cases/number-of-products-per-order-by-country.md): How to use the Metrics API to get mixed stats about the number of SKUs included in the orders of your organization, grouped by different countries
- [Best-selling products by market](https://docs.commercelayer.io/metrics/getting-started/use-cases/best-selling-products-by-market.md): How to use the Metrics API to get the Top 5 best-selling products for each of your organization's market
- [Customers that bought a specific product](https://docs.commercelayer.io/metrics/getting-started/use-cases/customers-that-bought-a-specific-product.md): How to use the Metrics API to get the total number of customers that bought a specific product or bundle
- [Shipments average time in picking](https://docs.commercelayer.io/metrics/getting-started/use-cases/shipments-average-time-in-picking.md): How to use the Metrics API to get the average time your shipments stay in picking status before being packed
- [Top 10 spenders by currency](https://docs.commercelayer.io/metrics/getting-started/use-cases/top-10-spenders-by-currency.md): How to use the Metrics API to get the Top 10 spenders among your customers and know how their total purchase amount is divided by currency.
- [Orders by day](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-by-day.md): How to use the Metrics API to get the total number of orders of your organization, grouped by day
- [Returns per year by destination city](https://docs.commercelayer.io/metrics/getting-started/use-cases/returns-per-year-by-destination-city.md): How to use the Metrics API to get the total number of returns requested for your orders, grouped by year and destination city
- [Refunds by country and currency](https://docs.commercelayer.io/metrics/getting-started/use-cases/refunds-by-country-and-currency.md): How to use the Metrics API to get the total number of refunds of your organization, grouped by the different countries and currencies
- [Latest carts with a specific product from a specific market](https://docs.commercelayer.io/metrics/getting-started/use-cases/last-carts-with-a-specific-product-from-a-specific-market.md): How to use the Metrics API to get the most recently created carts containing a specific SKU, from a specific market
- [Orders by resource error code and message](https://docs.commercelayer.io/metrics/getting-started/use-cases/orders-by-resource-error-code-and-message.md): How to use the Metrics API to check the errors associated with the orders of your organization (if any) .
- [Latest archived orders](https://docs.commercelayer.io/metrics/getting-started/use-cases/latest-archived-orders.md): How to use the Metrics API to get the most recently archived orders
- [Latest placed orders from customers with specific email domains](https://docs.commercelayer.io/metrics/getting-started/use-cases/latest-placed-orders-from-customers-with-specific-email-domains.md): How to use the Metrics API to get the last placed orders containing specific email domains in the aggregated details
- [Frequently bought together products](https://docs.commercelayer.io/metrics/getting-started/use-cases/frequently-bought-together-products.md): How to use the Metrics API to get the products that have been most frequently bought together with other ones


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/metrics/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
