copilot_frontend
copilot_budget

Get Complete Budget Form

Gets ALL data needed for the budget form in ONE request.

This endpoint combines:

  1. Client contact data from HubSpot (by email)
  2. Commercial agent data (from user or comercial_id param for admin)
  3. All catalogs:
    • Panels (active)
    • Micro investors (active)
    • Promotions (active)
    • Extras (active)
    • Provinces (all with production data)
    • Structures (active)
    • Payment methods (all)
    • Discount backups (all)
  4. Financing entities (unique, from active coefficients only)
  5. Available financing months (unique, from active coefficients only)

Protected Endpoint: Requires JWT authentication and 'ui_comercial' or 'admin' role

Args: email: Client email to search in HubSpot comercial_id: Commercial ID to impersonate (only for admin) current_user: Current authenticated user db: Database session

Returns: CompleteBudgetFormResponse: Complete form data with client, commercial, and all catalogs

Raises: ErrValidation: If comercial_id cannot be determined ErrNotFound: If commercial or client not found ErrHubSpot: If error fetching client from HubSpot

get/api/budget/form

Query parameters

emailstring required
comercial_idinteger nullable

Commercial ID (admin uses this to impersonate)

Commercial ID (admin uses this to impersonate)

Response

Successful Response

commercial_namestring nullable

Commercial agent name

commercial_phonestring nullable

Commercial agent phone

Changes

No recorded changes to this endpoint across all 1 revision of this API.