Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/akibanks/api-tienda-vinilos/llms.txt

Use this file to discover all available pages before exploring further.

POST /registro creates a new user account with the cliente role. Usernames must be unique across the system; the provided value is trimmed of surrounding whitespace before any lookup or storage. Passwords are hashed with bcrypt at 10 rounds before being written to the database — the plaintext password is never persisted.

Endpoint details

PropertyValue
MethodPOST
Path/registro
AuthNone required
Rate limit10 requests per 15 minutes

Request body

nombre_usuario
string
required
The desired username. Must be unique across the system. Leading and trailing whitespace is trimmed automatically before validation and storage.
password
string
required
The account password. Must be at least 6 characters long. Stored as a bcrypt hash (10 rounds) — never in plaintext.

Example request

curl -X POST https://your-api-url/registro \
  -H "Content-Type: application/json" \
  -d '{"nombre_usuario": "juan", "password": "mypassword123"}'

Responses

201 Created

The account was created successfully. The new user is assigned the cliente role by default.
{
  "mensaje": "Usuario creado exitosamente."
}
mensaje
string
A human-readable confirmation message. Value is always "Usuario creado exitosamente." on success.

400 Bad Request — Missing fields

Returned when nombre_usuario (after trimming) or password is absent or empty.
{
  "error": "Nombre de usuario y contraseña son requeridos."
}

400 Bad Request — Password too short

Returned when the supplied password is fewer than 6 characters.
{
  "error": "La contraseña debe tener al menos 6 caracteres."
}

409 Conflict — Username already taken

Returned when another account already exists with the same (trimmed) username.
{
  "error": "El nombre de usuario ya está en uso."
}

429 Too Many Requests — Rate limit exceeded

Returned when the caller has sent more than 10 registration requests within a 15-minute window.
{
  "error": "Demasiados intentos. Intenta de nuevo en 15 minutos."
}

500 Internal Server Error

Returned when an unexpected server-side error occurs (e.g., a database connectivity failure).
{
  "error": "Error al crear la cuenta."
}

A placeholder email address in the format {username}@vinylvibes.local is generated and stored internally (e.g., juan@vinylvibes.local). The API does not require or accept a real email address during registration, and this placeholder is never exposed in any response.

Build docs developers (and LLMs) love