{"openapi":"3.1.0","info":{"title":"Flait — flight deal intelligence","description":"Deal intelligence for cheap-flight hunting on nomad corridors (US↔LatAm, US↔SE Asia, intra-nomad hops). Built for humans AND AI agents: every endpoint returns clean JSON. Key endpoint for agents: /v1/score — ask 'is this price good for this route?' backed by real price history.","version":"0.1.0"},"paths":{"/v1/beta":{"post":{"summary":"Join the beta waitlist","operationId":"post_beta_v1_beta_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BetaSignup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/intents":{"post":{"summary":"Standing intent: watch a route; optionally book automatically when it hits","operationId":"post_intent_v1_intents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watch/status":{"get":{"summary":"Watch + booking status for a status_key (from watch creation)","operationId":"watch_status_v1_watch_status_get","parameters":[{"name":"k","in":"query","required":false,"schema":{"type":"string","default":"","title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deals":{"get":{"summary":"Current best deals across nomad corridors","operationId":"get_deals_v1_deals_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/arbitrage":{"get":{"summary":"Point-of-sale arbitrage: same flight, cheaper booked from another market","operationId":"get_arbitrage_v1_arbitrage_get","parameters":[{"name":"min_spread_pct","in":"query","required":false,"schema":{"type":"number","default":5,"title":"Min Spread Pct"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/score":{"get":{"summary":"Is this price a good deal? (the oracle endpoint for agents)","operationId":"get_score_v1_score_get","parameters":[{"name":"origin","in":"query","required":true,"schema":{"type":"string","title":"Origin"}},{"name":"destination","in":"query","required":true,"schema":{"type":"string","title":"Destination"}},{"name":"price_usd","in":"query","required":true,"schema":{"type":"number","title":"Price Usd"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/history/{origin}/{destination}":{"get":{"summary":"Daily price history for a route","operationId":"get_history_v1_history__origin___destination__get","parameters":[{"name":"origin","in":"path","required":true,"schema":{"type":"string","title":"Origin"}},{"name":"destination","in":"path","required":true,"schema":{"type":"string","title":"Destination"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/book/search":{"post":{"summary":"Search live, bookable flight offers (Duffel)","operationId":"book_search_v1_book_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookSearch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/book/order":{"post":{"summary":"Create a flight order for a selected offer (test mode)","operationId":"book_order_v1_book_order_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookOrder"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BetaSignup":{"properties":{"email":{"type":"string","title":"Email"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"website":{"type":"string","title":"Website","default":""}},"type":"object","required":["email"],"title":"BetaSignup"},"BookOrder":{"properties":{"offer_id":{"type":"string","title":"Offer Id"},"amount":{"type":"string","title":"Amount"},"currency":{"type":"string","title":"Currency"},"passenger":{"$ref":"#/components/schemas/Passenger"}},"type":"object","required":["offer_id","amount","currency","passenger"],"title":"BookOrder"},"BookSearch":{"properties":{"origin":{"type":"string","title":"Origin"},"destination":{"type":"string","title":"Destination"},"departure_date":{"type":"string","title":"Departure Date"},"cabin":{"type":"string","title":"Cabin","default":"economy"}},"type":"object","required":["origin","destination","departure_date"],"title":"BookSearch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntentIn":{"properties":{"email":{"type":"string","title":"Email"},"origin":{"type":"string","title":"Origin"},"destination":{"type":"string","title":"Destination"},"max_price_usd":{"type":"number","title":"Max Price Usd"},"website":{"type":"string","title":"Website","default":""},"auto_book":{"type":"boolean","title":"Auto Book","default":false},"given_name":{"type":"string","title":"Given Name","default":""},"family_name":{"type":"string","title":"Family Name","default":""},"born_on":{"type":"string","title":"Born On","default":""},"phone_number":{"type":"string","title":"Phone Number","default":""},"webhook_url":{"type":"string","title":"Webhook Url","default":""}},"type":"object","required":["email","origin","destination","max_price_usd"],"title":"IntentIn"},"Passenger":{"properties":{"id":{"type":"string","title":"Id"},"given_name":{"type":"string","title":"Given Name"},"family_name":{"type":"string","title":"Family Name"},"born_on":{"type":"string","title":"Born On"},"title":{"type":"string","title":"Title","default":"mr"},"gender":{"type":"string","title":"Gender","default":"m"},"email":{"type":"string","title":"Email"},"phone_number":{"type":"string","title":"Phone Number"}},"type":"object","required":["id","given_name","family_name","born_on","email","phone_number"],"title":"Passenger"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}