copilot_frontend
copilot_order
Get Order Form Endpoint
Gets ALL data needed for the order (pedido) form in ONE request.
This endpoint combines:
- Client contact data from HubSpot (by email)
- Commercial agent data from current user
- All catalogs (11 original + 6 new for orders):
- Panels (active)
- Micro investors (active)
- Promotions (active)
- Extras (active)
- Provinces (all with production data)
- Structures (active)
- Payment methods (all)
- Payment methods cash (active with discounts)
- Options (active)
- Batteries (active)
- Electrical protections (active) [NEW]
- Financing quota promotions (active) [NEW]
- Ground types (active) [NEW]
- Subsidies (active) [NEW]
- Financing signed (active) [NEW]
- Construction licenses (active) [NEW]
- Financing entities (unique, from active coefficients only)
- 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 current_user: Current authenticated user
Returns: CompleteBudgetFormResponse: Complete form data with client, commercial, and all catalogs
Raises: ErrValidation: If user does not have comercial_id ErrNotFound: If commercial or client not found ErrHubSpot: If error fetching client from HubSpot
get/api/order/form
Query parameters
emailstring required
comercial_idinteger nullable
Override comercial ID. Admin use only.
Override comercial ID. Admin use only.
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.