{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildworkpro-com/json-schema/buildworkpro-com-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildworkpro-com-search-api-openapi.yml#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "project",
        "contact",
        "site_log",
        "document",
        "bid",
        "lead",
        "invoice",
        "pay_app",
        "change_order"
      ],
      "description": "Entity type of the match."
    },
    "id": {
      "type": "integer",
      "description": "Id of the matched record; fetch it from that type's own endpoint."
    },
    "title": {
      "type": "string",
      "description": "Display title (name, number or filename)."
    },
    "subtitle": {
      "type": [
        "string",
        "null"
      ],
      "description": "Short secondary text — email, project number, or the start of the matched body. Null when there is none."
    },
    "projectId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Parent project for change orders, pay apps, site logs and invoices; null when the record has none. Absent for other types."
    }
  },
  "required": [
    "type",
    "id",
    "title",
    "subtitle"
  ]
}