Get All Users
Retrieve all registered users (customers) with their profile information. Users are sorted by registration date (newest first).Authentication
Requires Clerk authentication with admin role. All admin routes are protected byprotectRoute and adminOnly middleware.
Response
Array of customer user objects
MongoDB ObjectId
User’s full name
User’s email address (unique)
User’s profile image URL
Array of saved addresses
Address label (e.g., “Home”, “Work”)
Recipient name for this address
Street address
City
Contact phone number
Whether this is the default address
Whether the user account is active (default: true)
Document type: “cedula_ciudadania”, “cedula_extranjeria”, or “pasaporte”
Document number
Gender: “masculino”, “femenino”, or “otro”
ISO 8601 date of birth
ISO 8601 timestamp of registration
Update Customer Status
Activate or deactivate a customer account. Inactive accounts may have restricted access.Authentication
Requires Clerk authentication with admin role.Path Parameters
MongoDB ObjectId of the customer to update
Request
New account status.
true to activate, false to deactivate.Response
Success message indicating activation or deactivation
Error Responses
User Model Fields
For reference, the complete User model includes the following fields:email(string, required, unique) - User’s email addressname(string, required) - User’s full nameimageUrl(string) - Profile image URL from ClerkclerkId(string, required, unique) - Clerk authentication IDstripeCustomerId(string) - Stripe customer ID for paymentsaddresses(array) - Saved shipping addresseswishlist(array of ObjectIds) - References to Product documentsisActive(boolean, default: true) - Account active statusemailNotifications(boolean, default: true) - Email notification preferencemarketingEmails(boolean, default: false) - Marketing email opt-indocumentType(string) - Document type enumdocumentNumber(string) - Government ID numbergender(string) - Gender enumdateOfBirth(Date) - Date of birthphone(string) - Phone numbercreatedAt(Date) - Auto-generated timestampupdatedAt(Date) - Auto-generated timestamp