Endpoint
Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header:Request body
All fields are optional. Only include the fields you want to update. Other profile fields (email, role, register_number, employee_id, etc.) cannot be updated through this endpoint.
Response
Success response
Returns the updated user profile data.Indicates if the request was successful
Success message
Updated user profile data
User’s unique identifier
User’s full name
User’s email address
User’s role. One of:
student, faculty, or store_employeeStudent or faculty registration number (null if not applicable)
Employee ID for store employees (null if not applicable)
User’s phone number (null if not provided)
Whether the user’s email has been verified
Number of times the user failed to pick up orders
User’s trust level based on order history. One of:
good, watch, or restrictedISO 8601 date when ordering restrictions will be lifted (null if not restricted)
ISO 8601 date of the last no-show incident (null if none)
ISO 8601 date when the account was created
ISO 8601 date when the profile was last updated
Store information (only present if user role is
store_employee and owns a store)Error responses
Always
false for errorsError description
Validation rules
name: Must be a non-empty string if provided. Whitespace is automatically trimmed.phoneNumber: Can be any string value, empty string, or null.- Fields not in the allowed list (
name,phoneNumber) are ignored. - The
email,role,register_number,employee_id, and other system fields cannot be modified through this endpoint.
Examples
Success response example
Update only name example
Remove phone number example
Error response example
The
updated_at timestamp is automatically updated whenever the profile is modified.