The registration endpoint creates a new user account with an inactive status by default. After a successful registration, a 5-digit numeric verification code is sent to the user’s email address. The account must be verified before it can be used to log in. No authentication token is required for this endpoint.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Method:POSTPath:
/api/user/registerAuth required: No
Request Body
The user’s first name.
The user’s last name.
A unique, valid email address. Used for login and account verification. Registration will be rejected if this address is already associated with an existing account.
The account password. Stored as a bcrypt hash — never in plain text.
The user’s contact phone number.
The user’s sex. Must be one of the following values:
MasculinoFemeninoOtro
The user’s identification document number.
The type of identification document. Must be one of the following values:
CC— Cédula de CiudadaníaCE— Cédula de ExtranjeríaPasaporte— Passport
The user’s date of birth (e.g.
"1990-05-20").Response — 200 OK
A successful registration returns the saved user object along with a confirmation message. The new account is automatically assigned the roleUsuario (value "1") and an Inactivo (value "2") activation status.
A human-readable confirmation message.
Always
true on success.The newly created user document.
Example Request
Example Response
After registration, a 5-digit verification code is sent to the provided email. Each digit is a value from 1 to 5 (the server uses
Math.ceil(Math.random() * 5), so 0 never appears). You must call POST /api/user/verify-account with that code before the account can be used to log in.Error Responses
| Status Code | Meaning |
|---|---|
202 | An account with the provided email address already exists. |
203 | One or more required body fields are missing from the request. |
500 | An unexpected server error occurred. |