API Reference

Welcome to the Catalogy API platform. This documentation specifies expected request bodies, responses, and authorization requirements for all endpoints.

Authentication & Users

POST /register application/json Public Endpoint

Register a new user in the system. Sends a confirmation email to the user.

Request Body (JSON)

{
  "name": "John Doe",
  "email": "john@example.com",
  "password": "securepassword123"
}

Expected Response

201 Created
{
  "message": "registered successfully and email sent"
}
POST /login Public Endpoint

Authenticate a user and return a JWT token. Uses Basic Authentication.

Request Headers

Authorization: Basic <base64(email:password)>

Expected Response

200 OK
{
  "status": true,
  "token": "eyJhbGciOiJIUzI1NiIsInR5c..."
}
GET /user Protected

Retrieve information about the currently authenticated user.

POST /reset application/json Public Endpoint

Request a password reset link to be sent to user email.

POST /change_password application/json Protected

Change the password for the current user.

POST /resend_confirmation Public Endpoint

Resend the account confirmation email.

Negocios (Businesses)

POST /negocios multipart/form-data Protected

Create a new business associated with the authenticated user. Expects a FormData object containing both text fields and optional files for logos and backgrounds.

Request Form Data

  • name: Text
  • direccion: Text
  • telefono: Text
  • ws_telefono: Text
  • telefono2: Text (Optional)
  • correo: Text
  • web: Text (Optional)
  • pais: Integer ID
  • provincia: Integer ID
  • ciudad: Integer ID
  • moneda: Text
  • rubro: Integer ID (Optional)
  • tipo: Integer ID (Optional)
  • twitter: Text (Optional)
  • instagram: Text (Optional)
  • facebook: Text (Optional)
  • f_pedidos_ws: "true" or "false"
  • f_carrito: "true" or "false"
  • url_image: File (Image)
  • url_background: File (Image)

Expected Response

201 Created
{
  "Negocio": { ...business data... }
}
GET /negocios Protected

Retrieve a list of all businesses owned by the current user.

GET /negocios/<int:negocioId> Protected

Retrieve full details of a specific business.

PUT /negocios/<int:negocioId> multipart/form-data Protected

Update an existing business profile. Expects the exact same FormData structure as the POST route.

DELETE /negocios/<int:negocioId> Protected

Delete a business.

GET /negocio/<int:negocioId> Public Endpoint

Public endpoint to retrieve business info (Used for Customer App).

GET /dashboard/negocios/<int:negocioId> Protected

Retrieve the count of cartas, articulos, and categorias for a business dashboard.

Cartas (Menus)

POST /negocios/<int:negocioId>/cartas application/json Protected

Create a new menu (carta) and optionally link categories and items to it by providing their IDs and positions.

Request Body (JSON)

{
  "name": "Menu de Verano",
  "description": "Menu de temporada",
  "negocio_id": 1,
  "estado": true,
  "categorias": [
    {
      "id": 1,
      "position": 1,
      "articulos": [
        { "id": 10, "position": 1 },
        { "id": 11, "position": 2 }
      ]
    }
  ]
}
GET /negocios/<int:negocioId>/cartas Protected

Retrieve all menus for a specific business.

GET /negocios/<int:negocioId>/cartas/<int:cartaId> Protected

Retrieve a specific menu by ID.

PUT /negocios/<int:negocioId>/cartas/<int:cartaId> application/json Protected

Update an existing menu details. Expects the exact same JSON structure as the POST route.

PUT /negocios/<int:negocioId>/cartas/<int:cartaId>/estado application/json Protected

Update only the active/inactive status of a menu.

Request Body (JSON)

{
  "estado": true
}
DELETE /negocios/<int:negocioId>/cartas/<int:cartaId> Protected

Delete a menu.

GET /negocio/<int:negocioId>/catalogo/<int:cartaId> Public Endpoint

Public endpoint used by the QR Code/Customer app to read the catalog.

GET /qrcode/cartas/<int:cartaId> Protected

Generate and return the QR Code image for the menu.

POST /categorias/<int:categoriaId>/cartas/<int:cartaId> Protected

Link an existing Categoria to a Carta.

DELETE /categorias/<int:categoriaId>/cartas/<int:cartaId> Protected

Unlink a Categoria from a Carta.

Categorias (Categories)

POST /negocios/<int:negocioId>/categorias multipart/form-data Protected

Create a new category in a business.

Request Form Data

  • name: Text
  • description: Text
  • negocio_id: Integer ID
  • estado: "true" or "false"
GET /negocios/<int:negocioId>/categorias Protected

List all categories for a business.

PUT /negocios/<int:negocioId>/categorias/<int:categoriaId> multipart/form-data Protected

Update an existing category. Expects same structure as POST.

DELETE /negocios/<int:negocioId>/categorias/<int:categoriaId> Protected

Delete a category.

Articulos (Items)

POST /articulos multipart/form-data Protected

Create a new item (dish/product) inside a business catalog. Expects FormData and accepts an image file upload for the item's photo.

Request Form Data

  • name: Text
  • description: Text
  • precio: Float
  • discount: Text (Optional)
  • negocio_id: Integer ID
  • estado: "true" or "false"
  • url_image: File (Image)
GET /negocios/<int:negocioId>/articulos Protected

List all items across a business.

GET /negocios/<int:negocioId>/articulos/<int:articuloId> Protected

Retrieve a specific item.

PUT /negocios/<int:negocioId>/articulos/<int:articuloId> multipart/form-data Protected

Update a specific item. Expects same structure as POST.

DELETE /negocios/<int:negocioId>/articulos/<int:articuloId> Protected

Delete a specific item.

Images

POST /upload/image multipart/form-data Protected

Upload an image file to the server (e.g. logos or item photos).

GET /image/<string:filename> Public Endpoint

Retrieve a stored image file by filename.

DELETE /image/<string:filename> Protected

Delete a stored image.