The Users API manages user profiles stored in Firestore. A profile is created automatically the first time a user callsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Panahashi-Backend/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/v1/users/me after authenticating. Profiles inherit the display name and email from their Firebase Auth record.
UserProfile object
Firebase UID.
Display name from Firebase Auth.
Email address.
Phone number.
One of:
CUSTOMER, BAKER, ADMIN. Default: CUSTOMER.Linked bakery ID (set when a BAKER role user is assigned a bakery).
Firebase Cloud Messaging device token for push notifications.
Profile creation epoch ms.
GET /api/v1/users/me
Returns the authenticated user’s profile. Creates the profile automatically if it doesn’t exist yet. Auth required: Yes (any role)PATCH /api/v1/users/me
Updates the authenticated user’s profile. All fields are optional. Auth required: Yes (any role)New display name.
Phone number.
FCM device token for push notifications. Update this whenever the token refreshes on the client.
GET /api/v1/users
Returns all user profiles sorted by display name. Auth required: Yes — ADMINGET /api/v1/users/bakers
Returns all users with theBAKER role.
Auth required: Yes — ADMIN
GET /api/v1/users/
Returns a single user’s profile by UID. Auth required: Yes — ADMINFirebase UID of the user.
PATCH /api/v1/users//role
Changes a user’s role. Auth required: Yes — ADMINFirebase UID of the user.
New role:
CUSTOMER, BAKER, or ADMIN.Changing a user to
BAKER does not automatically assign a bakery. An admin must create a bakery with the user’s UID as ownerId separately.