账单
接口类型: 类型接口
scope:public
功能: 获得本次行程的总花费、包括基本费用、溢价费用
支持运力: private-car,express-car,taxi(只有司机填写了账单才能获取)
资源URL
GET: v1/orders/{didi_oid}/bill
请求参数:
参数名 | 类型 | 说明 |
---|---|---|
didi_oid | string | 行程ID |
curl -X GET
-H "Content-Type: application/x-www-form-urlencoded"
-H 'Authorization: Bearer domain|{access_token}'
'https://api.xiaojukeji.com/v1/orders/{didi_oid}/bill'
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
oid | string | 第三方订单id(如果提供了) |
didi_oid | string | 滴滴订单id |
create_time | DATE_ISO8601时间格式 | 约车时间 |
status | string | 行程状态(见备注) |
price | json | 行程总费用,只在行程结束时返回 |
currency | 货币种类 | |
amount | 金额,单位:分 | |
total_time | 总时长,单位:秒 | |
total_distance | 总里程,单位:米 | |
type | 费用类型 | |
description | 费用描述,英文 | |
description_cn | 费用描述,中文 | |
charges | json | 费用详情 |
currency | 货币种类 | |
amount | 金额,单位:分 | |
type | 费用类型 | |
description | 费用描述,英文 | |
description_cn | 费用描述,中文 |
返回示例
成功:http status 200
失败:http status 非200
{
"oid": "1234567890",
"didi_oid": "{didi_oid}",
"status": "Finished",
"create_time": "2016-07-29T11:36:42+0800",
"price": {
"currency": "CNY",
"amount": 16598,
"total_time": 2940,
"total_distance": 50900,
"type": "totalFee",
"description": "total fee",
"description_cn": "总费用"
},
"charges": [
{
"currency": "CNY",
"amount": 800,
"type": "startPrice",
"description": "starting price",
"description_cn": "起步价"
},
{
"currency": "CNY",
"amount": 8228,
"type": "drivingFee",
"description": "driving fee",
"description_cn": "里程费"
},
{
"currency": "CNY",
"amount": 3950,
"type": "emptyFee",
"description": "empty driving fee",
"description_cn": "远途费"
},
{
"currency": "CNY",
"amount": 1900,
"type": "highwayFee",
"description": "highway tolls",
"description_cn": "高速费"
},
{
"currency": "CNY",
"amount": 1720,
"type": "timeFee",
"description": "time fee",
"description_cn": "时长费"
},
{
"currency": "CNY",
"amount": 300,
"type": "cancelFee",
"description": "cancel fee",
"description_cn": "取消费"
}
]
}