{"openapi":"3.1.0","info":{"title":"Virág Flowers ordering API","version":"1.0.0","description":"Order flower bouquets with a handwritten card for delivery in Manhattan, NYC. Prices are all-inclusive. Creating an order returns a Stripe-hosted checkout_url; the order is confirmed once paid. No authentication required."},"servers":[{"url":"https://virag-nine.vercel.app"}],"paths":{"/api/catalog":{"get":{"operationId":"getCatalog","summary":"Bouquets, prices, delivery rules and remaining capacity","responses":{"200":{"description":"Catalog"}}}},"/api/quote":{"post":{"operationId":"checkDelivery","summary":"Check whether a tier can be delivered to a ZIP on a date","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"type":"string"},"zip":{"type":"string"},"delivery_date":{"type":"string"}}}}}},"responses":{"200":{"description":"Quote"}}}},"/api/orders":{"post":{"operationId":"createOrder","summary":"Create an order and get a Stripe checkout_url","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tier":{"type":"string","enum":["sweet","romantic","grand"],"description":"Which bouquet: sweet ($119), romantic ($229) or grand ($749). All prices include card, delivery and tax."},"recipient_name":{"type":"string","minLength":1,"maxLength":80,"description":"Full name of the person receiving the flowers."},"recipient_phone":{"type":"string","minLength":7,"maxLength":25,"description":"Recipient's US phone number. The courier calls it for building access."},"address_line1":{"type":"string","minLength":3,"maxLength":120,"description":"Street address in Manhattan, e.g. '245 E 19th St'."},"address_line2":{"description":"Apartment, floor, company or suite.","type":"string","maxLength":60},"zip":{"type":"string","description":"5-digit Manhattan ZIP code (10001–10282)."},"delivery_date":{"description":"YYYY-MM-DD in New York time. Omit for the earliest available date.","type":"string"},"card_message":{"default":"","description":"Text handwritten on the card, max 300 characters.","type":"string","maxLength":300},"sender_name":{"type":"string","minLength":1,"maxLength":60,"description":"How the card is signed, e.g. 'Love, Daniel'."},"buyer_email":{"description":"Buyer's email for the receipt and delivery confirmation.","type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"delivery_instructions":{"description":"Doorman, buzzer code, 'leave with front desk', etc.","type":"string","maxLength":200},"agent_name":{"description":"Optional: name of the AI agent/app placing the order (helps us support you).","type":"string","maxLength":60},"idempotency_key":{"description":"Optional: reuse the same key when retrying so the order is never created twice.","type":"string","maxLength":100}},"required":["tier","recipient_name","recipient_phone","address_line1","zip","sender_name"]}}}},"responses":{"200":{"description":"Idempotent replay of an existing order"},"201":{"description":"Order created","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["awaiting_payment","paid","placed","delivered","expired","cancelled","refunded"]},"tier":{"type":"string"},"amount_usd":{"type":"number"},"delivery_date":{"type":"string"},"delivery_area":{"type":"string"},"checkout_expires_at":{"type":"string"}}},{"type":"object","properties":{"checkout_url":{"type":"string"}}}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","outside_delivery_area","date_unavailable","date_full","sold_out","payment_provider_error","not_found"]},"message":{"type":"string"},"field":{"type":"string"},"available_dates":{"type":"array","items":{"type":"string"}},"waitlist_url":{"type":"string"}}}}}}}},"409":{"description":"Sold out or date full","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","outside_delivery_area","date_unavailable","date_full","sold_out","payment_provider_error","not_found"]},"message":{"type":"string"},"field":{"type":"string"},"available_dates":{"type":"array","items":{"type":"string"}},"waitlist_url":{"type":"string"}}}}}}}},"422":{"description":"Outside delivery area or date unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","outside_delivery_area","date_unavailable","date_full","sold_out","payment_provider_error","not_found"]},"message":{"type":"string"},"field":{"type":"string"},"available_dates":{"type":"array","items":{"type":"string"}},"waitlist_url":{"type":"string"}}}}}}}}}}},"/api/orders/{order_id}":{"get":{"operationId":"getOrderStatus","summary":"Order status","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["awaiting_payment","paid","placed","delivered","expired","cancelled","refunded"]},"tier":{"type":"string"},"amount_usd":{"type":"number"},"delivery_date":{"type":"string"},"delivery_area":{"type":"string"},"checkout_expires_at":{"type":"string"}}}}}},"404":{"description":"Not found"}}}},"/api/waitlist":{"post":{"operationId":"joinWaitlist","summary":"Join the waitlist when sold out","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"tier":{"type":"string"},"zip":{"type":"string"},"agent_name":{"type":"string"}}}}}},"responses":{"201":{"description":"Joined"}}}}}}