{
  "openapi": "3.1.0",
  "info": {
    "title": "شركة الأصدقاء للخدمات التمريضية ورعاية المسنين API",
    "description": "API for booking elderly care, geriatric home nursing, Alzheimer's care, stroke rehabilitation, and nursing home residency in Cairo and Mansoura, Egypt.",
    "version": "1.0.0",
    "contact": {
      "name": "شركة الأصدقاء",
      "url": "https://asdeqaanursing.com",
      "phone": "+201043884190"
    }
  },
  "servers": [
    {
      "url": "https://asdeqaanursing.com",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/api/bookings": {
      "post": {
        "summary": "Create a new nursing or elderly care booking request",
        "description": "Submits a new care request for elderly care, stroke rehabilitation, Alzheimer's care, or nursing home admission.",
        "operationId": "createBooking",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["client_name", "phone", "service_type", "branch"],
                "properties": {
                  "client_name": { "type": "string", "description": "Patient or guardian full name" },
                  "phone": { "type": "string", "description": "Primary Egyptian mobile or WhatsApp number (e.g. 010xxxxxxxx)" },
                  "secondary_phone": { "type": "string" },
                  "service_type": { 
                    "type": "string", 
                    "enum": ["elderly-care", "alzheimer-care", "stroke-care", "home-nursing", "elderly-home", "wound-care", "home-doctors", "injections-iv", "post-operative", "emergency-nursing"] 
                  },
                  "branch": { "type": "string", "enum": ["nozha", "mansoura"] },
                  "shift_type": { "type": "string", "enum": ["visit", "shift-12", "full-residence", "consultation"] },
                  "address_details": { "type": "string", "description": "Detailed home address" },
                  "notes": { "type": "string", "description": "Clinical diagnosis or patient needs" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Booking request successfully recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "message": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/services": {
      "get": {
        "summary": "List available medical and elderly care services",
        "operationId": "listServices",
        "responses": {
          "200": {
            "description": "List of specialized care services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "name": { "type": "string" },
                      "description": { "type": "string" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
