For the complete documentation index, see llms.txt. This page is also available as Markdown.

User Search

Administrative, read-only endpoints for finding users by email address, name, phone number, or order number and reading a single user's profile.

Core Capabilities

  • List users, 10 per page by default, ordered by id ascending unless sort is given.

  • Find a user by email address, by name, by phone number, or by the number of an order the user placed.

  • Read one user by identifier.

  • Every record carries the user's profile, communication permissions, and account type — registered and guest users, active and inactive, are all returned.

Only GET is supported; POST, PUT, PATCH, and DELETE return 405.

Filtering

Filters can be combined; a user must satisfy all of them.

Parameter
Match

id

Exact user identifier.

q

Same as email. It is not a free-text search.

email

Case-insensitive exact match on the email addresses registered to the account (verified or not). Leading and trailing spaces are ignored. A user whose profile shows an email address that is not among the registered addresses (for example, a user created by a data import) is not found.

first_name, last_name

Case-insensitive partial match — ann finds Anna and Joanne.

phone

Exact match; the value must be written the way it is stored.

order_number

Partial match on the numbers of the user's orders. A user appears once even when several orders match.

Ordering

Use sort with a field of the returned record, such as pk, date_joined, last_login, or last_name; prefix with - for descending order. An unknown field name is ignored and the default order applies. id is not accepted as a sort field; use pk instead (sort=-id is ignored and the results stay in ascending order).

Dynamic Settings & Environment Variables

No dynamic settings (dj_dynamic_settings) affect these endpoints. The validation settings used when a user is saved (PHONE_NUMBER_UNIQUE_VALIDATOR_ACTIVE, USER_PROFILE_VALIDATIONS) apply only to user updates, never to reading.

Last updated

Was this helpful?