{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Salon SF API",
    "version": "1.0.0",
    "description": "San Francisco haircuts, structured for AI agents. Independent site. Not affiliated with any salon listed. Booking happens on the salon's own system. All data carries provenance (status, source, observedAt)."
  },
  "servers": [
    {
      "url": "https://agentsalonsf.com/api/v1"
    }
  ],
  "paths": {
    "/salons": {
      "get": {
        "operationId": "listSalons",
        "summary": "List salons",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/salons/{slug}": {
      "get": {
        "operationId": "getSalon",
        "summary": "Full salon record",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/stylists/{slug}": {
      "get": {
        "operationId": "getStylist",
        "summary": "Stylist record with next openings",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/search": {
      "get": {
        "operationId": "searchHaircuts",
        "summary": "Multi-constraint search. Hard constraints are never relaxed; empty results include noMatch.reason.",
        "parameters": [
          {
            "name": "haircut_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "cut",
                "cut_wash",
                "cut_wash_style",
                "buzz",
                "beard_trim",
                "blow_dry",
                "other"
              ]
            }
          },
          {
            "name": "hair_length",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "short",
                "medium",
                "long",
                "any"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Substring of the service name"
          },
          {
            "name": "max_price",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "USD, inclusive"
          },
          {
            "name": "neighborhood",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "financial-district",
                "soma",
                "mission",
                "hayes-valley",
                "lower-haight",
                "castro",
                "marina",
                "nob-hill",
                "north-beach",
                "richmond",
                "sunset",
                "other"
              ]
            }
          },
          {
            "name": "stylist",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specialty",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "e.g. asian-mens-hair, curly-hair"
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Salon-local date"
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "description": "Earliest start, salon-local HH:MM"
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "description": "Latest start, salon-local HH:MM"
          },
          {
            "name": "require_availability",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Invalid query"
          }
        }
      }
    },
    "/availability": {
      "get": {
        "operationId": "getAvailability",
        "summary": "Derived bookable start times for an offering",
        "parameters": [
          {
            "name": "salon",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offering",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Offering id or slug"
          },
          {
            "name": "stylist",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ClaimStatus": {
        "type": "string",
        "enum": [
          "verified",
          "reported",
          "inferred",
          "unknown",
          "stale"
        ]
      },
      "Provenance": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ClaimStatus"
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "Freshness": {
        "type": "string",
        "enum": [
          "fresh",
          "stale",
          "unknown"
        ]
      }
    }
  }
}