跳转到主要内容
POST
Create Flight Search

请求规范

  • 方法与路径: POST /apis/v1/duffel/flights/offer-requests/create
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/duffel/flights/offer-requests/create
  • return_offers: query; 可选
  • supplier_timeout: query; 可选
  • view: query; 可选
  • Runtime 事实版本: d0ae990bcd8ea1a75abd7e4a4e47260a24ab01e5c2b9d2fcc0366eae9f069f96
完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

公开参考价格:每次成功请求 $0.02 USD。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。
  • 默认请求参考估价(USD): 0.02
  • 计费依据: fixed_success
  • 结算证据来源: request_snapshot

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

查询参数

return_offers
boolean
默认值:true

When set to true, the offer request resource returned will include all the offers returned by the airlines. If set to false, the offer request resource won't include any offers. To retrieve the associated offers later, use the List Offers endpoint, specifying the offer_request_id. You should use this option if you want to take advantage of the pagination, sorting and filtering that the List Offers endpoint provides.

示例:

false

supplier_timeout
integer
默认值:20000

The maximum amount of time in milliseconds to wait for each airline search to complete. This timeout applies to the response time of the call to the airline and includes some additional overhead added by Duffel. Value should be between 2 seconds and 60 seconds. Any values outside the range will be ignored and the default supplier_timeout will be used. If a value is set, the response will only include offers from airline searches that completed within the given time. If a value is not set, the response will only include offers from airline searches that completed within the default supplier_timeout value of 20 seconds. We recommend setting supplier_timeout lower than the timeout on the HTTP request you send to Duffel API as that will allow us to respond with the offers we received before your request times out with an empty response.

示例:

10000

view
enum<string>
默认值:offers

The format of the response. When set to offers (the default), the response includes a flat list of offers. When set to itineraries, offers are grouped into a hierarchical structure of slices, itineraries, and brands, with shared data (airlines, places, aircraft) in top-level reference maps.

可用选项:
offers,
itineraries

请求体

application/json
data
Body parameters · object
必填

响应

成功响应