{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pestprocrm-com/json-schema/pestprocrm-com-appointment-schema.json",
  "title": "Appointment",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pestprocrm-com-appointments-api-openapi.yml#/components/schemas/Appointment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Appointment ID (same as customer ID)"
    },
    "customerId": {
      "type": "string",
      "description": "Customer ID"
    },
    "customerName": {
      "type": "string",
      "description": "Customer name"
    },
    "customerPhone": {
      "type": "string",
      "description": "Customer phone"
    },
    "customerAddress": {
      "type": "string",
      "description": "Service address"
    },
    "scheduledDate": {
      "type": "string",
      "format": "date",
      "description": "Scheduled date"
    },
    "scheduledTime": {
      "type": "string",
      "description": "Scheduled time (HH:MM)"
    },
    "services": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Services to perform"
    },
    "serviceCategory": {
      "type": "string",
      "description": "Service category"
    },
    "visitNumber": {
      "type": "integer",
      "description": "Visit number"
    },
    "totalVisits": {
      "type": "integer",
      "description": "Total visits in plan"
    },
    "status": {
      "type": "string",
      "description": "Customer status"
    },
    "paymentStatus": {
      "type": "string",
      "description": "Payment status"
    },
    "appointmentConfirmed": {
      "type": "boolean",
      "description": "Appointment confirmed"
    },
    "needsReschedule": {
      "type": "boolean",
      "description": "Needs rescheduling"
    },
    "notes": {
      "type": "string",
      "description": "Appointment notes"
    }
  }
}