> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/customer-report/list-customer-report.md).

# List customer report

Returns a paginated list of users, each row combining the user's profile and communication permissions with order statistics aggregated over all of the user's orders. Registered and guest users are both included.

Results are ordered by `id` ascending by default. Sort by any field of the row except `logged_ip` with `sort` (e.g. `?sort=-total_order_amount`).

The default page size is **1000** rows; `limit` accepts up to **10000**.

Aggregates count every order regardless of status, and filters never change them — see **Order Aggregates** in the **Customer Report** section.

No dynamic settings or environment variables affect this endpoint.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Customer Report","description":"Administrative, read-only endpoint that returns a **customer report** — one row per user, combining the user's profile and communication permissions with order statistics aggregated over all of the user's orders.\n\n## Core Capabilities\n\n* List every user on the channel — registered and guest users, active and inactive, staff included — ordered by `id` ascending by default.\n* Each row carries four order aggregates computed at request time: `total_order_count`, `total_orderitem_count`, `total_order_amount`, and `total_order_discount_amount`, plus `last_order_date`.\n* Filter by profile fields, communication permissions, dates, groups, `attributes` keys, and whether the user has placed an order (`is_customer`).\n* Sort by any field of the row except `logged_ip`, including the aggregates (e.g. `?sort=-total_order_amount`).\n* Large default page size: **1000** rows, up to **10000** with `limit`.\n\nOnly `GET` is supported; `POST`, `PUT`, `PATCH`, and `DELETE` return `405`.\n\n## Order Aggregates\n\n| Field | Computation |\n|-------|-------------|\n| `total_order_count` | Number of the user's orders. |\n| `total_orderitem_count` | Number of order item records across all of the user's orders. |\n| `total_order_amount` | Sum of `amount` of the user's orders; `0.00` when the user has no order. |\n| `total_order_discount_amount` | Sum of `discount_amount` of the user's orders; `0.00` when the user has no order. |\n| `last_order_date` | `created_date` of the user's most recent order; `null` when the user has no order. |\n\n* Every order is counted **regardless of its status** — cancelled and refunded orders are included.\n* When sorting by `last_order_date`, users without an order (`null`) come **last** in ascending order and **first** in descending order.\n* Filters narrow the rows but never change the aggregates: a user's totals are the same with or without `is_customer` or any other filter.\n\n## Filtering\n\n| Parameter | Match |\n|-----------|-------|\n| `id` | Exact user identifier. |\n| `email` | Case-insensitive exact match on the user's **email address records** (every address the account has registered, verified or not), not on the `email` column of the row. |\n| `first_name`, `last_name`, `phone`, `gender` | Case-insensitive **exact** match — partial values return an empty page. |\n| `email_allowed`, `sms_allowed`, `call_allowed`, `is_active` | Boolean (`true` / `false`). |\n| `is_customer` | `true` or `True` selects users with at least one order; **any other value** (including `1` or `yes`) selects users without an order. |\n| `platform` | Exact match on `attributes.register_client_type`, the client the user registered from. |\n| `date_joined` | Exact registration date-time in ISO 8601 (`2026-01-01T10:30:00Z`). |\n| `date_joined__gt`, `date_joined__gte`, `date_joined__lt`, `date_joined__lte` | Registration date and time. Accepts a date (`2026-01-01`, read as midnight UTC) or a date-time (`2026-01-01T10:30:00Z`, `2026-01-01 10:30:00`). |\n| `last_login`, `last_login__gt`, `last_login__gte`, `last_login__lt`, `last_login__lte` | Last login date-time in ISO 8601 (`2026-01-01T10:30:00Z`). |\n| `date_of_birth`, `date_of_birth__gt`, `date_of_birth__gte`, `date_of_birth__lt`, `date_of_birth__lte` | Date of birth (`1990-05-17`). |\n| `modified_date`, `modified_date__gt`, `modified_date__gte`, `modified_date__lt`, `modified_date__lte` | Last modification date-time of the user record in ISO 8601 (`2026-01-01T10:30:00Z`). |\n| `group` / `group__not` | Users that are / are not members of the given group identifier. |\n| `attributes__<key>` | Case-insensitive substring match on a key of the user's attributes. Add `__exact` for an exact match or `__isnull=true` / `false` for key absence / presence (e.g. `?attributes__logged_ip__isnull=false`). |\n\n* A filter parameter followed by `!` negates it (e.g. `?gender!=male`).\n\n## Dynamic Settings & Environment Variables\n\nNo dynamic settings (`dj_dynamic_settings`) and no environment variables affect this endpoint. The row set, the aggregates, the filters, and the page size behave identically regardless of management-panel configuration."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"parameters":{"page":{"name":"page","in":"query","required":false,"description":"The page number to return.","schema":{"type":"integer","default":1}},"sort":{"name":"sort","in":"query","required":false,"description":"Orders the results by one or more fields. Separate multiple fields with commas. Prefix a field with a hyphen (`-`) for descending order.","schema":{"type":"string"}}},"schemas":{"UserGender":{"type":"string","description":"The gender of the user.","enum":["male","female","not_to_say"]},"PaginatedCustomerReportList":{"type":"object","description":"A paginated list of customer report rows.","properties":{"count":{"type":"integer","description":"Total number of rows matching the request."},"next":{"type":["string","null"],"format":"uri","description":"URL of the next page, or `null` if this is the last page."},"previous":{"type":["string","null"],"format":"uri","description":"URL of the previous page, or `null` if this is the first page."},"results":{"type":"array","description":"The rows on the current page.","items":{"$ref":"#/components/schemas/CustomerReport"}}}},"CustomerReport":{"type":"object","description":"A single customer report row — a user's profile, communication permissions, and aggregated order statistics.","properties":{"id":{"type":"integer","description":"Unique identifier of the user."},"first_name":{"type":"string","description":"First name of the user; empty string when not set."},"last_name":{"type":"string","description":"Last name of the user; empty string when not set."},"gender":{"oneOf":[{"$ref":"#/components/schemas/UserGender"},{"type":"null"}]},"date_of_birth":{"type":["string","null"],"format":"date","description":"Date of birth of the user."},"date_joined":{"type":"string","format":"date-time","description":"When the user registered."},"phone":{"type":["string","null"],"description":"Phone number of the user."},"email":{"type":"string","description":"Email of the user; empty string when not set."},"email_allowed":{"type":"boolean","description":"Whether the user has opted in to email communication."},"sms_allowed":{"type":"boolean","description":"Whether the user has opted in to SMS communication."},"call_allowed":{"type":["boolean","null"],"description":"Whether the user has opted in to phone call communication; `null` when never set."},"whatsapp_allowed":{"type":["boolean","null"],"description":"Whether the user has opted in to WhatsApp communication; `null` when never set."},"last_login":{"type":["string","null"],"format":"date-time","description":"When the user last logged in."},"user_type":{"oneOf":[{"$ref":"#/components/schemas/UserType"},{"type":"null"}]},"total_order_amount":{"type":"string","format":"decimal","description":"Sum of the `amount` of all of the user's orders, regardless of status; `\"0.00\"` when the user has no order."},"total_order_discount_amount":{"type":"string","format":"decimal","description":"Sum of the `discount_amount` of all of the user's orders, regardless of status; `\"0.00\"` when the user has no order."},"last_order_date":{"type":["string","null"],"format":"date-time","description":"Creation date of the user's most recent order; `null` when the user has no order."},"total_order_count":{"type":"integer","description":"Number of the user's orders."},"total_orderitem_count":{"type":"integer","description":"Number of order item records across all of the user's orders."},"logged_ip":{"type":["string","null"],"description":"The IP address stored in `attributes.logged_ip`; `null` when absent. Not sortable."}}},"UserType":{"type":"string","description":"The type of the user account.\n\n| Value | Description |\n|-------|-------------|\n| `registered` | A user who created an account. |\n| `guest` | An account created automatically for a customer who placed an order without registering. |","enum":["registered","guest"]},"ValidationError":{"type":"object","description":"Returned when the request contains invalid or missing data. Errors are grouped by the field they apply to: each key is the name of a field from the request and its value is a list of one or more messages describing what is wrong with that field. Messages that do not belong to any single field are grouped under `non_field_errors`.","properties":{"non_field_errors":{"type":"array","description":"Error messages that apply to the request as a whole rather than to a specific field.","items":{"type":"string"}}},"additionalProperties":{"type":"array","description":"The list of error messages for the field named by the key.","items":{"type":"string"}}},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}},"responses":{"ValidationError":{"description":"The request contains invalid or missing data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidPage":{"description":"The requested `page` does not exist — it is past the last page or not a valid page number. Paginated list endpoints answer with `404` rather than an empty page. The literal value `last` is accepted and returns the final page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/users/report/":{"get":{"tags":["Customer Report"],"operationId":"listCustomerReport","summary":"List customer report","description":"Returns a paginated list of users, each row combining the user's profile and communication permissions with order statistics aggregated over all of the user's orders. Registered and guest users are both included.\n\nResults are ordered by `id` ascending by default. Sort by any field of the row except `logged_ip` with `sort` (e.g. `?sort=-total_order_amount`).\n\nThe default page size is **1000** rows; `limit` accepts up to **10000**.\n\nAggregates count every order regardless of status, and filters never change them — see **Order Aggregates** in the **Customer Report** section.\n\nNo dynamic settings or environment variables affect this endpoint.","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/sort"},{"name":"limit","in":"query","required":false,"description":"The number of rows to return per page. Values above `10000` are capped at `10000`; `0` or a non-numeric value falls back to the default.","schema":{"type":"integer","default":1000,"maximum":10000}},{"name":"id","in":"query","required":false,"description":"Filter by the exact user identifier.","schema":{"type":"integer"}},{"name":"email","in":"query","required":false,"description":"Case-insensitive exact match on the user's email address records.","schema":{"type":"string"}},{"name":"first_name","in":"query","required":false,"description":"Case-insensitive exact match on the first name.","schema":{"type":"string"}},{"name":"last_name","in":"query","required":false,"description":"Case-insensitive exact match on the last name.","schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"description":"Case-insensitive exact match on the phone number.","schema":{"type":"string"}},{"name":"gender","in":"query","required":false,"description":"Case-insensitive exact match on the gender.","schema":{"$ref":"#/components/schemas/UserGender"}},{"name":"email_allowed","in":"query","required":false,"description":"Filter by email communication permission.","schema":{"type":"boolean"}},{"name":"sms_allowed","in":"query","required":false,"description":"Filter by SMS communication permission.","schema":{"type":"boolean"}},{"name":"call_allowed","in":"query","required":false,"description":"Filter by phone call communication permission.","schema":{"type":"boolean"}},{"name":"is_active","in":"query","required":false,"description":"Filter by whether the user account is active.","schema":{"type":"boolean"}},{"name":"is_customer","in":"query","required":false,"description":"`true` or `True` selects users with at least one order; any other value selects users without an order.","schema":{"type":"boolean"}},{"name":"platform","in":"query","required":false,"description":"Exact match on `attributes.register_client_type`, the client the user registered from.","schema":{"type":"string"}},{"name":"date_joined","in":"query","required":false,"description":"Exact registration date and time.","schema":{"type":"string","format":"date-time"}},{"name":"date_joined__gt","in":"query","required":false,"description":"Users registered after this date or date-time. A date is read as midnight UTC.","schema":{"type":"string"}},{"name":"date_joined__gte","in":"query","required":false,"description":"Users registered on or after this date or date-time. A date is read as midnight UTC.","schema":{"type":"string"}},{"name":"date_joined__lt","in":"query","required":false,"description":"Users registered before this date or date-time. A date is read as midnight UTC.","schema":{"type":"string"}},{"name":"date_joined__lte","in":"query","required":false,"description":"Users registered on or before this date or date-time. A date is read as midnight UTC.","schema":{"type":"string"}},{"name":"last_login","in":"query","required":false,"description":"Exact last login date and time.","schema":{"type":"string","format":"date-time"}},{"name":"last_login__gt","in":"query","required":false,"description":"Users who last logged in after this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"last_login__gte","in":"query","required":false,"description":"Users who last logged in on or after this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"last_login__lt","in":"query","required":false,"description":"Users who last logged in before this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"last_login__lte","in":"query","required":false,"description":"Users who last logged in on or before this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"date_of_birth","in":"query","required":false,"description":"Users born on this date.","schema":{"type":"string","format":"date"}},{"name":"date_of_birth__gt","in":"query","required":false,"description":"Users born after this date.","schema":{"type":"string","format":"date"}},{"name":"date_of_birth__gte","in":"query","required":false,"description":"Users born on or after this date.","schema":{"type":"string","format":"date"}},{"name":"date_of_birth__lt","in":"query","required":false,"description":"Users born before this date.","schema":{"type":"string","format":"date"}},{"name":"date_of_birth__lte","in":"query","required":false,"description":"Users born on or before this date.","schema":{"type":"string","format":"date"}},{"name":"modified_date","in":"query","required":false,"description":"Exact modification date and time of the user record.","schema":{"type":"string","format":"date-time"}},{"name":"modified_date__gt","in":"query","required":false,"description":"Users whose record was modified after this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"modified_date__gte","in":"query","required":false,"description":"Users whose record was modified on or after this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"modified_date__lt","in":"query","required":false,"description":"Users whose record was modified before this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"modified_date__lte","in":"query","required":false,"description":"Users whose record was modified on or before this date-time.","schema":{"type":"string","format":"date-time"}},{"name":"group","in":"query","required":false,"description":"Users that are members of this group identifier.","schema":{"type":"integer"}},{"name":"group__not","in":"query","required":false,"description":"Users that are not members of this group identifier.","schema":{"type":"integer"}}],"responses":{"200":{"description":"A paginated list of customer report rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomerReportList"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/InvalidPage"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/customer-report/list-customer-report.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
