{"openapi":"3.1.0","info":{"title":"Mile High Locksmith service requests","version":"1.1.0","description":"A price, information or service request delivered to the office for a reply using the customer’s instructions."},"servers":[{"url":"https://denver-locksmith.a9i.chatgpt.site"}],"paths":{"/api/pricing-request":{"get":{"operationId":"getLocksmithPricingForm","summary":"Read the price request form and its accepted fields.","responses":{"200":{"description":"Price request availability, form URL, endpoint and input schema."}}},"post":{"operationId":"requestLocksmithQuote","summary":"Send a customer-authorized price request to Mile High Locksmith.","description":"Submit once with the customer’s location and a phone number or email. The office replies with the quote. A new customer request gets a new requestId. Reuse the same ID and payload on retries.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Provide the location in the customer’s own words and a phone number or email address. Service details are optional.","properties":{"name":{"type":"string","maxLength":160,"description":"Customer name in one field (optional)."},"location":{"type":"string","minLength":1,"maxLength":250,"description":"Free-text service location, such as a city, ZIP code, or nearby landmark."},"phone":{"type":"string","description":"Phone number for a call or text."},"email":{"type":"string","description":"Address for an email reply."},"reply":{"type":"string","enum":["call","text","email"]},"category":{"type":"string","enum":["Home locks","Business locks","Car keys","Locked out","Something else"]},"service":{"type":"string","description":"The specific locksmith service requested."},"details":{"type":"string","maxLength":1800},"vehicle":{"type":"string","maxLength":140},"nextStep":{"type":"string","enum":["immediate","scheduled","onsite","quote","guide"],"description":"Use quote when the customer only wants a price."},"visitTime":{"type":"string","maxLength":120},"requestId":{"type":"string","format":"uuid","description":"Use a fresh UUID per request. Keep it and the payload unchanged on a retry."}},"required":["location"],"anyOf":[{"required":["phone"],"properties":{"phone":{"pattern":"\\S"}}},{"required":["email"],"properties":{"email":{"pattern":"\\S"}}}]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","description":"Provide the location in the customer’s own words and a phone number or email address. Service details are optional.","properties":{"name":{"type":"string","maxLength":160,"description":"Customer name in one field (optional)."},"location":{"type":"string","minLength":1,"maxLength":250,"description":"Free-text service location, such as a city, ZIP code, or nearby landmark."},"phone":{"type":"string","description":"Phone number for a call or text."},"email":{"type":"string","description":"Address for an email reply."},"reply":{"type":"string","enum":["call","text","email"]},"category":{"type":"string","enum":["Home locks","Business locks","Car keys","Locked out","Something else"]},"service":{"type":"string","description":"The specific locksmith service requested."},"details":{"type":"string","maxLength":1800},"vehicle":{"type":"string","maxLength":140},"nextStep":{"type":"string","enum":["immediate","scheduled","onsite","quote","guide"],"description":"Use quote when the customer only wants a price."},"visitTime":{"type":"string","maxLength":120},"requestId":{"type":"string","format":"uuid","description":"Use a fresh UUID per request. Keep it and the payload unchanged on a retry."}},"required":["location"],"anyOf":[{"required":["phone"],"properties":{"phone":{"pattern":"\\S"}}},{"required":["email"],"properties":{"email":{"pattern":"\\S"}}}]}}}},"responses":{"200":{"description":"JSON confirmation of office delivery.","content":{"application/json":{"schema":{"type":"object","required":["state","requestId","confirmationUrl"],"properties":{"state":{"const":"sent"},"requestId":{"type":"string","format":"uuid"},"confirmationUrl":{"const":"/thank-you-for-your-order/"}}}}}},"303":{"description":"HTML form submission delivered. Follow Location to the thank-you page.","headers":{"Location":{"schema":{"type":"string","const":"/thank-you-for-your-order/"}}}},"403":{"description":"Submission origin rejected."},"422":{"description":"Invalid request. Check the location, contact information and request ID."},"503":{"description":"Delivery unconfirmed. Retain the same payload and request ID."}}}},"/api/service-requests":{"get":{"operationId":"getLocksmithServiceInformation","summary":"Read services, contact information, hours, and online request availability.","responses":{"200":{"description":"Public business information and request availability."}}},"post":{"operationId":"sendLocksmithServiceRequest","summary":"Email a customer-authorized service request to the office.","description":"Send the customer’s request type, service details, location and contact preference. This JSON action requires a phone number. For an email-only request, use the alternate submit button in a native service form. Include an email address if the customer wants an email reply. For a quote with a location and a phone number or email, use the requestLocksmithQuote operation. Save requestId and reuse it when retrying the same request. After success with state sent, open confirmationUrl in the customer’s browser to display the existing thank-you page. Do not open a confirmation page for an invalid or unconfirmed request.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Same ID for retries of the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","enum":["general","locked-out","car-key-replacement","rekey-change-locks","lock-repair"]},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Customer name."},"phone":{"type":"string","minLength":10,"maxLength":30,"description":"Required phone number including area code. The customer may choose a text or email reply."},"location":{"type":"string","minLength":1,"maxLength":150,"description":"City or ZIP code where help is needed."},"address":{"type":"string","maxLength":250},"timing":{"type":"string","maxLength":120,"description":"When the customer would like a technician to arrive."},"details":{"type":"string","maxLength":2000,"description":"Problem and any vehicle year, make, and model relevant to the request."},"contact":{"type":"string","enum":["phone","text","email"]},"email":{"type":"string","format":"email","maxLength":200,"description":"Required when contact is email."},"intent":{"type":"string","enum":["quote","information","immediate","scheduled"]},"contactInstructions":{"type":"string","maxLength":500,"description":"Specific instructions for contacting the customer."},"requestId":{"type":"string","format":"uuid","description":"Keep this ID unchanged when retrying the same request; create a new ID for a different request."}},"required":["service","name","phone","location"],"allOf":[{"if":{"required":["contact"],"properties":{"contact":{"const":"email"}}},"then":{"required":["email"]}}],"additionalProperties":false}}}},"responses":{"200":{"description":"Request emailed to the office; appointment not yet confirmed.","content":{"application/json":{"schema":{"type":"object","required":["success","state","message","appointmentConfirmed"],"properties":{"success":{"type":"boolean"},"state":{"type":"string","enum":["sent","invalid","not_confirmed"]},"message":{"type":"string"},"appointmentConfirmed":{"type":"boolean","const":false},"requestId":{"type":"string","format":"uuid"},"confirmationUrl":{"type":"string","description":"Relative confirmation-page URL, returned only after confirmed delivery."}}}}}},"403":{"description":"Submission origin rejected; not sent.","content":{"application/json":{"schema":{"type":"object","required":["success","state","message","appointmentConfirmed"],"properties":{"success":{"type":"boolean"},"state":{"type":"string","enum":["sent","invalid","not_confirmed"]},"message":{"type":"string"},"appointmentConfirmed":{"type":"boolean","const":false},"requestId":{"type":"string","format":"uuid"},"confirmationUrl":{"type":"string","description":"Relative confirmation-page URL, returned only after confirmed delivery."}}}}}},"422":{"description":"Invalid or incomplete request; not sent.","content":{"application/json":{"schema":{"type":"object","required":["success","state","message","appointmentConfirmed"],"properties":{"success":{"type":"boolean"},"state":{"type":"string","enum":["sent","invalid","not_confirmed"]},"message":{"type":"string"},"appointmentConfirmed":{"type":"boolean","const":false},"requestId":{"type":"string","format":"uuid"},"confirmationUrl":{"type":"string","description":"Relative confirmation-page URL, returned only after confirmed delivery."}}}}}},"503":{"description":"Delivery unavailable or not confirmed. Preserve requestId and do not claim success.","content":{"application/json":{"schema":{"type":"object","required":["success","state","message","appointmentConfirmed"],"properties":{"success":{"type":"boolean"},"state":{"type":"string","enum":["sent","invalid","not_confirmed"]},"message":{"type":"string"},"appointmentConfirmed":{"type":"boolean","const":false},"requestId":{"type":"string","format":"uuid"},"confirmationUrl":{"type":"string","description":"Relative confirmation-page URL, returned only after confirmed delivery."}}}}}}}}}}}