---
title: "Retrieves orders aggregated by customer with total amounts and most recent order information."
method: GET
path: "/orders/aggregated-overview"
tags: ["Order"]
---

# Retrieves orders aggregated by customer with total amounts and most recent order information.

`GET /orders/aggregated-overview`

## Query parameters

- `page` integer
- `page_size` integer
- `sort` string[]
- `customer_mail` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `last_order_date` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `last_order_name` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `logic` 'and' | 'or'

## Response `200`

OK

- QueryAggregatedOrdersEndpointPagedResultOfOutput
  - `total` integer, required
  - `page` integer, required
  - `pageSize` integer, required
  - `items` QueryAggregatedOrdersEndpointOutput[], required
    - `amount` integer, required — The total number of orders for this customer.
    - `last7Days` integer, required — The number of orders placed in the last 7 days.
    - `lastOrderDate` string, date-time, required — The date of the most recent order.
    - `lastOrderName` string, required — The name of the most recent order.
    - `lastOrderId` string, required — The ID of the most recent order.
    - `customerMail` string, required — The customer's email address.
  - `totalPages` integer

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/d779de93a5ee/schema)
