User Registration
Create a new user account. Automatically logs in the user and returns an API token.Request Body
User’s full name. Maximum 255 characters. Cannot contain HTML/script tags (
<, >, {, }, /).User’s email address. Must be unique in the system.
User’s password. Must meet security requirements:
- Minimum 8 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one number
Password confirmation. Must match the
password field.User’s role. Allowed values:
cliente- Regular customerempresa- Business owneradmin- Administrator
Response
Response status. Returns
success on successful registration.Newly created user information.
Laravel Sanctum API token for immediate authentication.
Suggested redirect URL based on user role:
cliente:/(main store)empresa:/empresa/panel(business dashboard)admin:/admin/dashboard(admin panel)
Success message.
Upon successful registration, a welcome email is automatically sent to the user’s email address.
Business Registration Request
Submit a business registration request. This is the first step for businesses to join BeanQuick. Admin approval is required before the business can be activated.Request Body (multipart/form-data)
Business name. Maximum 255 characters.
Business contact email. Must be unique (not already submitted).
Tax identification number (NIT). Maximum 50 characters. Optional.
Business phone number. Maximum 50 characters. Optional.
Business physical address. Maximum 255 characters. Optional.
Business description. Optional.
Business logo image. Allowed formats:
jpeg, png, jpg, webp. Maximum size: 2MB. Optional but recommended.Store/location photo. Allowed formats:
jpeg, png, jpg, webp. Maximum size: 4MB. Optional.Response
Response status. Returns
success when request is submitted successfully.Confirmation message.
Unique identifier for the submitted request.
The request is created with status
pendiente (pending) and awaits admin approval. Once approved by an admin, an activation email with a unique token will be sent to the business email.Validate Activation Token
Validate a business activation token and retrieve the associated request details. This endpoint is used before displaying the activation form.Path Parameters
Activation token sent to the business email after admin approval.
Response
Response status. Returns
success if token is valid.Business request details.
Activate Business Account
Complete the business activation by creating a user account and business profile. This endpoint processes the final step after admin approval.Path Parameters
Activation token received via email after admin approval.
Request Body
Account password. Must be at least 8 characters.
Password confirmation. Must match the
password field.Response
Response status. Returns
success on successful activation.Confirmation message.
Created user account information.
This endpoint performs multiple operations in a database transaction:
- Creates a user account with role
empresa - Creates a business profile (
Empresa) linked to the user - Moves uploaded files from temporary to permanent storage
- Updates the request status to
completada - Invalidates the activation token
Business Registration Flow
The complete business registration process follows these steps:Submit Registration Request
Business submits initial request via
POST /api/solicitud-empresa with business details and images. Request status is set to pendiente.Admin Review
Admin reviews the request in the admin dashboard (
/admin/solicitudes) and either approves or rejects it.Approval Notification
If approved, admin triggers
POST /admin/aprobar/{id} which:- Updates request status to
aprobado - Generates a unique activation token
- Sends activation email to the business with a link containing the token
Token Validation
Business clicks the link and frontend calls
GET /api/empresa/validar-token/{token} to verify the token and display request details.Account Activation
Business sets their password and submits
POST /api/empresa/activar/{token} to create their account and business profile.Error Responses
400 Bad Request
Returned when required file uploads are missing or invalid.404 Not Found
Returned when activation token is invalid or already used.422 Unprocessable Entity
Returned when validation fails or business logic prevents the operation.500 Internal Server Error
Returned when an unexpected error occurs during activation.Public Catalog Endpoints
These endpoints are accessible without authentication and are used to browse the public catalog.Get Product Categories
Category ID
Category name (e.g., “Bebidas”, “Comida”, “Postres”)
Creation timestamp
Last update timestamp
This endpoint is public and does not require authentication.
Get Featured Products
Product ID
Product name
Product description
Product price
Available stock quantity
Full URL to product image
Average rating (1-5 stars)
Total number of ratings received
Business information
This endpoint returns a maximum of 4 products sorted by rating. Products must have at least one rating to appear in featured products.