{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/xonark-com/json-schema/xonark-com-practice-row-schema.json",
  "title": "PracticeRow",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/book-xonark-com-openapi.json#/components/schemas/PracticeRow",
  "additionalProperties": false,
  "properties": {
    "actions": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "booking_url": {
      "description": "The page where the patient books this clinic (the action whose times the row shows); opening it starts the booking there.",
      "format": "uri",
      "type": "string"
    },
    "canonical_profile_url": {
      "format": "uri",
      "type": "string"
    },
    "earliest": {
      "items": {
        "description": "One need's earliest open time, read from the clinic's own scheduler when the search ran. Each earliest is only a first pick: the first service in the clinic's own list whose name holds the need's word, an adult's before a child's. Clinic service names often say more than that word: \"New Patient Exam (No Cleaning)\", a new-patient bundle of exam, x-rays and cleaning, a service for children only, a fee or insurance note. Read service_name against what the patient needs; when it does not fit, choose the service that does from services and read its times with list_public_booking_slots.",
        "properties": {
          "booking_url": {
            "description": "The page where the patient books this time.",
            "format": "uri",
            "type": "string"
          },
          "date": {
            "format": "date",
            "type": "string"
          },
          "need": {
            "enum": [
              "cleaning",
              "exam",
              "emergency"
            ],
            "type": "string"
          },
          "service_id": {
            "type": "string"
          },
          "service_name": {
            "type": "string"
          },
          "slot_fingerprint": {
            "description": "holds a connected practice's time with hold_xona_booking_slot",
            "type": "string"
          },
          "slot_id": {
            "description": "books a clinic scheduler's time with choose_public_booking_time",
            "type": "string"
          },
          "start_local": {
            "type": "string"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          },
          "time_zone": {
            "type": "string"
          }
        },
        "required": [
          "need",
          "service_id",
          "service_name",
          "starts_at",
          "start_local",
          "time_zone"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "id": {
      "type": "string"
    },
    "locality": {
      "type": "string"
    },
    "match": {
      "description": "Present when the search carried constraints: the published facts that satisfied them.",
      "properties": {
        "booking": {
          "description": "the matching action kind",
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "new_patients": {
          "description": "always \"not yet verified\"",
          "type": "string"
        },
        "open": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "day → published hours text",
          "type": "object"
        },
        "services": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "source_checked_at": {
          "description": "day of the oldest fact the match rests on, so every matched fact is at least this fresh; absent when only a live booking route matched",
          "format": "date",
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "province": {
      "type": "string"
    },
    "read": {
      "description": "Present on a live row an order=soonest search read.",
      "properties": {
        "note": {
          "type": "string"
        },
        "outcome": {
          "enum": [
            "time",
            "none",
            "not_read"
          ],
          "type": "string"
        }
      },
      "required": [
        "outcome",
        "note"
      ],
      "type": "object"
    },
    "services": {
      "items": {
        "properties": {
          "duration_minutes": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "service_id": {
            "type": "string"
          }
        },
        "required": [
          "service_id",
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "slug": {
      "type": "string"
    },
    "when": {
      "description": "Present on an order=soonest search: why the row sits where it does.",
      "properties": {
        "hours_read": {
          "description": "day the clinic's own site was read for its hours",
          "format": "date",
          "type": "string"
        },
        "next_step": {
          "description": "for live_schedule: the tools that read more real times and book one",
          "type": "string"
        },
        "state": {
          "enum": [
            "live_schedule",
            "open_now",
            "opens_today",
            "opens_later",
            "unknown"
          ],
          "type": "string"
        },
        "text": {
          "description": "the list card's line, for example \"Open now until 5:00 pm\"; opening hours, not appointment times",
          "type": "string"
        },
        "time_zone": {
          "description": "IANA zone the hours were read in",
          "type": "string"
        }
      },
      "required": [
        "state"
      ],
      "type": "object"
    }
  },
  "required": [
    "id",
    "slug",
    "name",
    "canonical_profile_url",
    "actions"
  ],
  "type": "object"
}