{
  "openapi": "3.1.0",
  "info": {
    "title": "Inform Clinic — Consultation Booking API",
    "description": "Book a private consultation with Dr. Dushyanth Kalva, Board-Certified Plastic & Aesthetic Surgeon at Inform Clinic, Jubilee Hills, Hyderabad, India. The clinic specialises in cosmetic surgery, facial aesthetics, hair restoration, and body contouring.",
    "version": "1.1.0",
    "contact": {
      "name": "Inform Clinic",
      "url": "https://www.drdushyanthkalva.com",
      "email": "info@drdushyanthkalva.com"
    },
    "license": {
      "name": "All Rights Reserved",
      "url": "https://www.drdushyanthkalva.com/terms-of-service"
    }
  },
  "servers": [
    {
      "url": "https://www.drdushyanthkalva.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/book-consultation": {
      "post": {
        "operationId": "bookConsultation",
        "summary": "Request a consultation at Inform Clinic",
        "description": "Submit a consultation booking request for Dr. Dushyanth Kalva at Inform Clinic, Hyderabad. Provide the patient's name, phone number (E.164 format), and optionally the treatment they are interested in. The clinic team will call the patient within 24 hours on the provided number during business hours (Mon–Sat, 10 AM – 7 PM IST).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "phone"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 50,
                    "pattern": "^[a-zA-Z\\s'\\-]{3,50}$",
                    "description": "Full name of the patient. Letters, spaces, hyphens, and apostrophes only.",
                    "example": "Priya Sharma"
                  },
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{7,14}$",
                    "description": "Patient's phone number in E.164 format. For Indian numbers, prefix with +91 (e.g. +919876543210).",
                    "example": "+919876543210"
                  },
                  "treatment": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "The procedure or treatment area the patient is interested in. Optional — use 'Other / Not Sure' if unknown.",
                    "example": "Rhinoplasty",
                    "enum": [
                      "Rhinoplasty",
                      "Facelift",
                      "Eyelid Surgery",
                      "Eyebrow Lift",
                      "Chin Augmentation",
                      "Cheek Bone Augmentation",
                      "Lip Augmentation",
                      "Otoplasty",
                      "Liposuction",
                      "Tummy Tuck",
                      "Gynecomastia",
                      "Mommy Makeover",
                      "Breast Augmentation",
                      "Breast Reduction",
                      "Breast Lift",
                      "Areola Correction",
                      "Breast Asymmetry Correction",
                      "Arm & Thigh Lift",
                      "Body Contouring",
                      "Hip & Gluteal Enhancement",
                      "Hair Transplant",
                      "FUE Transplant",
                      "FUT Transplant",
                      "Robotic Hair Transplant",
                      "Mesotherapy",
                      "Hair Growth Booster",
                      "Dermal Fillers",
                      "Anti-Wrinkle Injections",
                      "Thread Lift",
                      "Skin Tightening",
                      "Non-Surgical Nose Job",
                      "Laser Hair Reduction",
                      "Other / Not Sure"
                    ]
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Optional note from the patient — e.g. preferred appointment time, specific concern, or prior treatment history.",
                    "example": "I am interested in rhinoplasty and would prefer a weekend appointment."
                  },
                  "source": {
                    "type": "string",
                    "description": "Origin of the booking — set to 'ai-agent' for programmatic calls.",
                    "example": "ai-agent",
                    "default": "ai-agent"
                  },
                  "landingSlug": {
                    "type": "string",
                    "description": "Landing page slug for ad-specific pages.",
                    "example": "best-liposuction-in-hyderabad"
                  },
                  "pageType": {
                    "type": "string",
                    "description": "Page family where the lead originated, e.g. 'landing' or 'website'.",
                    "example": "landing"
                  },
                  "placement": {
                    "type": "string",
                    "description": "Specific CTA placement or form location on the page.",
                    "example": "Hero Form"
                  },
                  "pagePath": {
                    "type": "string",
                    "description": "Pathname of the page where the lead was submitted.",
                    "example": "/landing/best-liposuction-in-hyderabad"
                  },
                  "referrer": {
                    "type": "string",
                    "description": "Document referrer when available.",
                    "example": "https://www.google.com/"
                  },
                  "utm_source": {
                    "type": "string",
                    "example": "google"
                  },
                  "utm_medium": {
                    "type": "string",
                    "example": "cpc"
                  },
                  "utm_campaign": {
                    "type": "string",
                    "example": "liposuction-hyderabad"
                  },
                  "utm_content": {
                    "type": "string",
                    "example": "hero-form"
                  },
                  "utm_term": {
                    "type": "string",
                    "example": "best liposuction in hyderabad"
                  },
                  "gclid": {
                    "type": "string",
                    "example": "EAIaIQobChMI-example"
                  },
                  "gbraid": {
                    "type": "string",
                    "example": "123examplegbraid"
                  },
                  "wbraid": {
                    "type": "string",
                    "example": "123examplewbraid"
                  }
                }
              },
              "examples": {
                "minimal": {
                  "summary": "Name and phone only",
                  "value": {
                    "name": "Arjun Reddy",
                    "phone": "+919876543210"
                  }
                },
                "full": {
                  "summary": "Full booking with treatment and message",
                  "value": {
                    "name": "Priya Sharma",
                    "phone": "+919812345678",
                    "treatment": "Rhinoplasty",
                    "message": "I would like to understand the recovery time for rhinoplasty before scheduling.",
                    "source": "ai-agent",
                    "pageType": "landing",
                    "landingSlug": "best-rhinoplasty-in-hyderabad",
                    "placement": "Hero Form",
                    "pagePath": "/landing/best-rhinoplasty-in-hyderabad",
                    "utm_source": "google",
                    "utm_medium": "cpc",
                    "utm_campaign": "rhinoplasty-hyd"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Consultation request successfully received.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "referenceId": {
                      "type": "string",
                      "description": "Unique reference ID for this booking request.",
                      "example": "INF-20260312-A3Z9"
                    },
                    "message": {
                      "type": "string",
                      "description": "Confirmation message to present to the patient.",
                      "example": "Thank you Priya Sharma. Your consultation request has been received. The Inform Clinic team will call you on +919812345678 within 24 hours during business hours."
                    },
                    "clinic": {
                      "type": "object",
                      "description": "Clinic contact details.",
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "Inform Clinic by Dr. Dushyanth Kalva"
                        },
                        "phone": {
                          "type": "string",
                          "example": "+91 72749 74974"
                        },
                        "email": {
                          "type": "string",
                          "example": "info@drdushyanthkalva.com"
                        },
                        "website": {
                          "type": "string",
                          "example": "https://www.drdushyanthkalva.com"
                        },
                        "address": {
                          "type": "string",
                          "example": "3rd Floor, Park View, Road No. 1, Jubilee Hills, Hyderabad – 500033, Telangana, India"
                        },
                        "hours": {
                          "type": "string",
                          "example": "Mon–Sat, 10 AM – 7 PM IST"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error — missing or invalid fields.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "phone must be in E.164 format (e.g. +919876543210 for an Indian number)."
                    },
                    "fields": {
                      "type": "object",
                      "description": "Map of field names to boolean indicating whether they failed validation."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited — too many requests from this IP."
          },
          "500": {
            "description": "Server error — advise patient to call the clinic directly."
          }
        },
        "x-ai-agent-instructions": "When booking on behalf of a user: (1) Always confirm the patient's name and phone number before submitting. (2) Phone must be in E.164 format — for India, prepend +91 to a 10-digit mobile number. (3) Present the referenceId and message from the response to the user for their records. (4) If the API returns a 500, instruct the user to call +91 72749 74974 directly."
      }
    }
  }
}