文档中心 > API类目 > 国内机票京杭API

alitrip.flight.itinerary.render (开票渲染)

开票渲染

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
itinerary_render_request ItineraryRenderRequest 必须 开票渲染入参
  • └ order_id
  • Number
  • 必须
  • 72163128
  • 生单反参的订单号

响应参数

名称 类型 示例值 描述
itinerary_fee_list ItineraryFee [] 支持开票的费用项。选中数组中你要开票的开票项透传给开票接口
  • └ fee_count
  • Number
  • 1
  • 费用项数量
  • └ invoice_amount
  • String
  • 100
  • 可开金额(单位:分)
  • └ fee_total_amount
  • String
  • 100
  • 费用总金额(单位:分)
  • └ applied_amount
  • String
  • 100
  • 已申请金额(单位:分)
  • └ fee_unique_id
  • String
  • 362919920450_58463261563175_1
  • 费用唯一Id-如果是合并的则展示feeUniqueId$feeUniqueId$feeUniqueId
  • └ fee_name
  • String
  • 机票款凭证
  • 费用名称
  • └ enable_apply_itinerary
  • Boolean
  • true
  • 是否能开行程单。为true才能用于下一步申请开票
  • └ invoice_item_name
  • String
  • 代订机票费
  • 发票项名称
  • └ currency_code
  • String
  • CNY
  • 币种
order_id Number 71253123 生单反参的订单号
is_success Boolean true 是否成功
error_code_info String INPUT_PARAM_ERROR 错误码
error_msg String 入参错误 错误信息
apply_request_id String 8c207bb9-6092-432a-af36-363715830d5f-13175 发票申请单id,申请开票必传。

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripFlightItineraryRenderRequest req = new AlitripFlightItineraryRenderRequest();
AlitripFlightItineraryRenderRequest.ItineraryRenderRequest obj1 = new AlitripFlightItineraryRenderRequest.ItineraryRenderRequest();
obj1.setOrderId(72163128L);
req.setItineraryRenderRequest(obj1);
AlitripFlightItineraryRenderResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_flight_itinerary_render_response>
    <itinerary_fee_list>
        <itinerary_fee>
            <fee_count>1</fee_count>
            <invoice_amount>100</invoice_amount>
            <fee_total_amount>100</fee_total_amount>
            <applied_amount>100</applied_amount>
            <fee_unique_id>362919920450_58463261563175_1</fee_unique_id>
            <fee_name>机票款凭证</fee_name>
            <enable_apply_itinerary>true</enable_apply_itinerary>
            <invoice_item_name>代订机票费</invoice_item_name>
            <currency_code>CNY</currency_code>
        </itinerary_fee>
    </itinerary_fee_list>
    <order_id>71253123</order_id>
    <is_success>true</is_success>
    <error_code_info>INPUT_PARAM_ERROR</error_code_info>
    <error_msg>入参错误</error_msg>
    <apply_request_id>8c207bb9-6092-432a-af36-363715830d5f-13175</apply_request_id>
</alitrip_flight_itinerary_render_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部