Skip to main content

Request Schemas

StartJobRequest

Schema for initiating a new service job.
query
string
required
User’s free text query describing the service needed (e.g., “fix my toilet”)
house_address
string
required
Full house address where the service is needed
zip_code
string
required
User’s ZIP code for provider matching
price_limit
float | string
required
Dollar amount budget limit or the string “no_limit”
date_needed
string
required
Date when service is needed in ISO format (e.g., “2025-12-10”)
Example:
{
  "query": "fix my toilet",
  "house_address": "123 Main St, San Jose, CA 95126",
  "zip_code": "95126",
  "price_limit": 250,
  "date_needed": "2025-12-10"
}

CompleteJobRequest

Schema for completing a job after answering clarifying questions.
job_id
string
required
The job ID returned from the start-job endpoint
answers
object
required
Dictionary mapping question IDs to answer strings
Example:
{
  "job_id": "abc123",
  "answers": {
    "q1": "The toilet is constantly running",
    "q2": "Standard toilet, not smart",
    "q3": "First floor bathroom"
  }
}

Response Schemas

StartJobResponse

Response returned when starting a new job.
job_id
string
Unique identifier for the created job (UUID format)
task
string
Extracted task category (e.g., “plumber”, “electrician”)
questions
array
Array of clarifying questions to gather more details
Example:
{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "task": "plumber",
  "questions": [
    {"id": "q1", "question": "What is the specific issue with your toilet?"},
    {"id": "q2", "question": "Is your toilet running constantly or leaking?"},
    {"id": "q3", "question": "How old is your toilet?"},
    {"id": "q4", "question": "Have you noticed any water damage around the toilet?"},
    {"id": "q5", "question": "Is this an emergency or can it wait a day?"}
  ]
}

CompleteJobResponse

Response returned when completing a job with matched providers.
job
object
The complete job object with all collected information
providers
array
Array of matched service providers
Example:
{
  "job": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "original_query": "fix my toilet",
    "task": "plumber",
    "house_address": "123 Main St, San Jose, CA 95126",
    "zip_code": "95126",
    "date_needed": "2025-12-10",
    "price_limit": 250,
    "clarifications": {
      "q1": "The toilet is constantly running",
      "q2": "Standard toilet, about 10 years old"
    },
    "questions": [],
    "status": "searched"
  },
  "providers": [
    {
      "id": 1,
      "job_id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Mike's Plumbing Services",
      "phone": "(408) 555-1234",
      "estimated_price": null,
      "negotiated_price": null,
      "call_status": null
    },
    {
      "id": 2,
      "job_id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Bay Area Plumbers",
      "phone": "(408) 555-5678",
      "estimated_price": null,
      "negotiated_price": null,
      "call_status": null
    }
  ]
}

Enums

JobStatus

Status values for job lifecycle tracking.
ValueDescription
collecting_infoInitial state, gathering clarifying information
ready_for_searchInformation collected, ready to search for providers
searchedProvider search completed, results available

Supporting Schemas

ClarifyingQuestion

Represents a question to gather additional job details.
id
string
Unique question identifier (e.g., “q1”, “q2”, “q3”)
question
string
The question text to display to the user

ProviderBase

Base provider information from search results.
name
string
Provider business name
phone
string | null
Provider phone number (optional)

ProviderCreate

Schema for creating a new provider record in the database.
name
string
Provider business name
phone
string | null
Provider phone number (optional)
job_id
string
Associated job ID

Build docs developers (and LLMs) love