copilot_frontend
copilot_budget

View Budget

View budget via encrypted token.

This is a PUBLIC endpoint (no authentication required).

The token contains the encrypted client_data_id. This endpoint:

  1. Decrypts the token to get client_data_id
  2. Retrieves client data from presup_datos_presupuesto_cliente
  3. Retrieves associated budget from presup_presupuestos
  4. Extracts data from datos_formulario
  5. Gets panel information from database:
    • If selected panel is premium -> also fetches basic panel
    • If selected panel is basic -> also fetches premium panel
  6. Prepares template context with both panel types for comparison
  7. Renders budget HTML template with the data

Args: token: Encrypted token containing client_data_id request: FastAPI request object (needed for Jinja2) db: Database session

Returns: HTMLResponse with budget visualization or friendly error page (404) if: - Token is invalid or expired - Client data or budget not found in database

get/api/budget/view/{token}

Path parameters

tokenstring required

Response

Successful Response

Changes