Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Israel-Perez/Nuxt-Secure/llms.txt

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

POST /api/modulo Creates a new module record. The value of strNombreModulo is automatically converted to uppercase before being stored.

Request body

strNombreModulo
string
required
Name of the new module. Stored in uppercase regardless of the casing supplied.

Response

success
boolean
required
true when the module is created successfully.
data
object
required
The newly created module record as returned by the database.

Error responses

StatusMessageCause
200 (with success: false)El nombre del módulo es obligatorio.strNombreModulo is missing or falsy in the request body.
200 (with success: false)No se pudo crear el módulo en la base de datos.Any unhandled database error during the insert.
Validation and database errors for this endpoint return HTTP 200 with success: false in the body rather than a 4xx/5xx HTTP status code.

Examples

curl --request POST \
  --url https://your-domain.com/api/modulo \
  --header 'Content-Type: application/json' \
  --cookie 'auth_token=<your-jwt>' \
  --data '{"strNombreModulo": "ventas"}'

Success response

200
{
  "success": true,
  "data": {
    "id": 6,
    "strNombreModulo": "VENTAS"
  }
}

Error response (missing name)

200
{
  "success": false,
  "message": "El nombre del módulo es obligatorio."
}