Base URL
The Haggle API is a RESTful API built with FastAPI that enables service provider discovery using Grok LLM and Grok Fast Search.Authentication
Currently, the API does not require authentication. This is a Phase 1 implementation.API Workflow
The Haggle API follows a two-step workflow:- Start Job - Submit a service request and receive clarifying questions
- Complete Job - Submit answers and receive matched service providers
Step 1: Start Job
job_id, inferred task type, and clarifying questions.
Step 2: Complete Job
Core Endpoints
Start Job
Create a new job and get clarifying questions
Complete Job
Submit answers and find providers
Provider Endpoints
List and retrieve provider information
Health Check
GET /api/health - Check API status
Response Format
All API responses return JSON. Successful responses return the appropriate data structure, while errors return:HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 404 | Resource not found (job_id or providers) |
| 500 | Internal server error |
| 503 | Service unavailable (call backend unreachable) |
Data Storage
- Jobs: Stored in-memory (not persisted to database). In production, use Redis or similar for session storage.
- Providers: Persisted to Supabase database for tracking negotiations and call status.
Next Steps
Start Job
Learn how to create a new service request
Complete Job
Learn how to complete a job with answers