{"openapi":"3.1.0","info":{"title":"Yule Love Lights Quote Request API","version":"1.0.0","summary":"Lets an AI assistant send a quote request to Yule Love Lights for a homeowner.","description":"Yule Love Lights installs Christmas lights and permanent LED roofline lighting on Long Island, NY (Nassau County and Suffolk County only). Use this endpoint only when a homeowner asked you to request a quote and agreed to be contacted. It saves the request and returns a reference number. It never returns a price or an install date: a team member contacts the homeowner for that. For read-only facts (services, price ranges, service area) use https://yulelovelights.com/openapi.json. No authentication. Rate limited per IP (10 per hour) and per phone or email (3 per 24 hours).","contact":{"name":"Yule Love Lights","email":"sales@yulelovelights.com","url":"https://yulelovelights.com/contact/"}},"externalDocs":{"description":"Developer guide","url":"https://yulelovelights.com/developers/"},"servers":[{"url":"https://quote.yulelovelights.com","description":"Production"}],"security":[],"tags":[{"name":"quotes","description":"Quote requests"}],"paths":{"/api/agent/quote-request":{"post":{"operationId":"createQuoteRequest","tags":["quotes"],"summary":"Send a quote request for a homeowner","description":"Saves the request and passes it to the Yule Love Lights team. Check the town first with checkServiceArea on the facts API if you can. Send an Idempotency-Key so a retry never creates a second request. The same phone or email asking again within 24 hours is accepted but not sent to the team twice. Set test: true while building your integration: the request is checked and saved but nobody is contacted.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value per request (a UUID works). Retrying with the same key and the same body returns the original answer. The body field idempotency_key works too; the header wins.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{16,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"202":{"description":"Request received. A team member will contact the homeowner.","headers":{"RateLimit-Limit":{"description":"Requests allowed per window, per IP.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window frees up.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"Limit and window, for example \"10;w=3600\".","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"\"true\" when this is the stored answer to an earlier request with the same key.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequestReceived"}}}},"400":{"description":"Invalid JSON or invalid fields (codes invalid_json, invalid_request).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 8 KB (code payload_too_large).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Body not sent as application/json (code unsupported_media_type).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Outside the service area (out_of_service_area), location could not be placed (location_unclear), or idempotency key reused with a different body (idempotency_key_reused).","headers":{"RateLimit-Limit":{"description":"Requests allowed per window, per IP.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window frees up.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"Limit and window, for example \"10;w=3600\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit hit (code rate_limited).","headers":{"RateLimit-Limit":{"description":"Requests allowed per window, per IP.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window frees up.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"Limit and window, for example \"10;w=3600\".","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not open yet (not_enabled) or temporarily unable to save (service_unavailable). Retry later with the same key.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"QuoteRequest":{"type":"object","required":["service","name","agent","contact_consent"],"description":"Send town or zip (or both), and phone or email (or both).","anyOf":[{"required":["town"]},{"required":["zip"]}],"properties":{"service":{"type":"string","enum":["christmas-lights-residential","permanent-led-roofline","commercial-christmas","landscape-lighting","event-lighting","wedding-lighting"],"description":"Service id, the same ids as the facts API /services."},"town":{"type":"string","description":"Town of the home, for example \"Huntington\" or \"Huntington, NY\".","maxLength":80},"zip":{"type":"string","description":"5-digit ZIP code of the home.","pattern":"^\\d{5}$"},"name":{"type":"string","description":"Homeowner's name.","maxLength":100},"phone":{"type":"string","description":"US phone number, 10 digits, any common format.","maxLength":40},"email":{"type":"string","description":"Email address.","format":"email","maxLength":254},"notes":{"type":"string","description":"What the homeowner wants, in plain text. Markup is removed.","maxLength":1000},"agent":{"type":"string","description":"Name of the assistant sending this, for example \"ChatGPT\" or \"Claude\".","maxLength":60},"contact_consent":{"type":"boolean","const":true,"description":"Must be true: the homeowner agreed to be contacted by Yule Love Lights about this request."},"sms_consent":{"type":"boolean","default":false,"description":"Send true ONLY if the homeowner agreed to this, in these words: \"I consent to receive text messages about Upcoming or Previous Projects from Yule Love Lights LLC, at the phone number I provided. Consent is not a condition of purchase. Msg & data rates may apply. Msg frequency varies. Reply HELP for help or STOP to opt out.\" Ask the homeowner this separately. Never infer it from contact_consent or from a phone number being given, and never send true by default. With true and a phone number, the homeowner gets the same text follow-ups as a website request. Leave it out or send false otherwise; the team will call or email instead."},"idempotency_key":{"type":"string","description":"Same as the Idempotency-Key header, for clients that cannot set headers.","pattern":"^[A-Za-z0-9_.:-]{16,128}$"},"test":{"type":"boolean","description":"true to check and save without contacting anyone."}}},"QuoteRequestReceived":{"type":"object","required":["reference","status","message","next_steps","quote_url","phone","docs"],"properties":{"reference":{"type":"string","description":"Reference number to give the homeowner."},"status":{"type":"string","const":"received"},"message":{"type":"string","description":"Plain-English summary to pass on."},"next_steps":{"type":"array","items":{"type":"string"},"description":"What happens next."},"quote_url":{"type":"string","description":"Online quote page for an exact price.","format":"uri","examples":["https://yulelovelights.com/get-a-quote/"]},"phone":{"type":"string","description":"Phone number for the homeowner to call."},"docs":{"type":"string","description":"Documentation link.","format":"uri"},"test":{"type":"boolean","description":"Present and true for a test request."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message","hint","docs"],"properties":{"code":{"type":"string","enum":["invalid_json","unsupported_media_type","payload_too_large","invalid_request","idempotency_key_reused","out_of_service_area","location_unclear","rate_limited","service_unavailable","not_enabled"],"description":"Machine-readable error code."},"status":{"type":"integer","description":"HTTP status."},"message":{"type":"string","description":"What went wrong."},"hint":{"type":"string","description":"How to fix it."},"docs":{"type":"string","description":"Documentation link.","format":"uri"},"details":{"type":"object","additionalProperties":{"type":"string","enum":["required","invalid","too_long"]},"description":"For invalid_request: field name to problem. \"location\" means send town or zip; \"contact\" means send phone or email."}}}}}}}}