create_staff function creates a Firebase Authentication user and writes a document to the u_staff Firestore collection. Staff are internal platform operators with access to administrative functions.
Endpoint
Request body
All fields are nested under a top-leveldata key.
Required fields
Full name of the staff member.
Email address. Used as the Firebase Authentication login credential.
Initial password for the Firebase Authentication account. Not stored in Firestore.
Optional fields
Contact phone number.
Account status.
Account classification used for role-based access checks.
Government-issued identification number.
Type of identification document.
Commercial or display name for the staff member.
Address fields
City. Stored under
address.city in Firestore.Country. Stored under
address.country in Firestore.Street address line. Stored under
address.line in Firestore.Postal code. Stored under
address.zipcode in Firestore.Example request
What is written to Firestore
The function writes a document tou_staff/{uid} with the following structure:
The document ID in Firestore is the Firebase Authentication UID. The
password field is never written to Firestore.Staff-specific fields
security_2fa
All staff documents are initialized with a security_2fa object:
| Field | Default value | Description |
|---|---|---|
security_2fa.status | false | Whether 2FA is currently enabled for this account. |
security_2fa.type | "email" | The 2FA delivery method. Initialized to "email". |
timezone
The timezone field is initialized as an empty string. Update it after creation with the staff member’s local IANA timezone identifier (for example, "America/Caracas").
Response
Success
Confirmation message including the new UID.
200 on success.