{
 "openapi": "3.1.0",
 "info": {
  "title": "Appliances Repair Yang — Appointment requests",
  "version": "1.0.0",
  "description": "Request an in-home appliance repair or maintenance visit. A coordinator confirms the date and arrival window by phone or WhatsApp (Mon-Sat 8 AM-6 PM). $69.99 diagnostic per appliance, credited toward the repair if approved. Gas ranges/ovens are not serviced (gas dryers are)."
 },
 "servers": [
  {
   "url": "https://n8n.167-233-219-230.nip.io/webhook"
  }
 ],
 "paths": {
  "/cita": {
   "post": {
    "operationId": "requestAppointment",
    "summary": "Request an appliance repair or maintenance appointment",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "name",
         "phone",
         "address",
         "zip",
         "appliance"
        ],
        "properties": {
         "name": {
          "type": "string",
          "description": "Customer full name"
         },
         "phone": {
          "type": "string",
          "description": "US phone, 10 digits"
         },
         "email": {
          "type": "string"
         },
         "address": {
          "type": "string",
          "description": "Street address of the service"
         },
         "city": {
          "type": "string"
         },
         "zip": {
          "type": "string",
          "pattern": "^\\d{5}$"
         },
         "appliance": {
          "type": "string",
          "description": "washer, dryer (electric or gas), refrigerator, dishwasher, electric range/oven, or preventive maintenance"
         },
         "brand": {
          "type": "string"
         },
         "problem": {
          "type": "string"
         },
         "service_type": {
          "type": "string",
          "enum": [
           "diagnostico",
           "mantenimiento",
           "garantia"
          ]
         },
         "preferred_date": {
          "type": "string",
          "format": "date"
         },
         "preferred_time": {
          "type": "string",
          "enum": [
           "manana",
           "tarde",
           "cualquiera"
          ],
          "description": "manana = 8 AM-12 PM, tarde = 12 PM-6 PM"
         },
         "language": {
          "type": "string",
          "enum": [
           "es",
           "en"
          ]
         },
         "source": {
          "type": "string",
          "description": "Use 'ai_agent' when an AI assistant submits for a customer"
         },
         "agent_name": {
          "type": "string",
          "description": "Name of the AI assistant submitting the request"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Request received",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "status": {
           "type": "string"
          },
          "folio": {
           "type": "string"
          },
          "coverage": {
           "type": "string"
          },
          "message_en": {
           "type": "string"
          },
          "message_es": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Missing or invalid fields"
     },
     "502": {
      "description": "Could not register; call or WhatsApp +1 754 236 4989"
     }
    }
   }
  }
 }
}