文档
测试

6.添加小费

POST
https://openapi-pre.huolala.cn/api/e-order-add-tips

调用注意事项

1.什么时候可以添加小费? 答:当订单状态order_statu=0配对中时,可添加小费时 2.是否可多次添加? 答:可多次添加,但是单次金额只能为5,10,20选项 3.是否有小费总金额上限? 答:订单小费总金额不能超过50元

服务入口

测试环境:https://openapi-pre.huolala.cn/api/e-order-add-tips 正式环境:https://openapi.huolala.cn/api/e-order-add-tips

编码

数据编码: Accept:application/json Content-type: application/json 字符编码: utf-8

前端UI参考:

![image.png](https://cos.easydoc.net/48578360/files/ka1wblta)

公共请求参数

参数名
类型
描述
必填
app_key
string
开发者应用唯一标识
必填
access_token
string
货拉拉用户授权给开发者应用的账户访问令牌码
必填
nonce_str
string
随机数,用户自定义,60s内不可重复使用,仅用于保证签名不可预测;示例:474
必填
timestamp
string
Unix时间戳(单位:秒),60s内有效,超过60s则超时;示例:1565225482
必填

应用级请求参数

参数名
类型
描述
必填
order_display_id
string
货拉拉订单号
必填
tips_fen
int
小费总金额(单分),值只能为500,1000,2000,可添加多次,小费总金额不能超过50元
必填

响应参数

参数名
类型
描述
必填
ret
int
返回结果码,示例:0
必填
msg
string
返回结果描述,示例:Success
必填
data
array
数据列表
必填
order_display_id
string
货拉拉订单号
必填
total_tips_fen
int
订单小费总金额(单位:分)
必填

request Body请求示例

```json { "app_key":"****************", "access_token":"**************", "nonce_str":"474", "timestamp":"1565225482040", "order_display_id":225400609008, "tips_fen":1000, } ```

response响应示例

```json { "ret": 0, "data": { "order_display_id": "225400609008", "total_tips_fen": 5000 }, "msg": "Success" } ```

返回状态码

|状态码|描述| |-|-|-| |0|成功| |1|服务器异常| |22003|无权限操作| |22009|超过小费上限| |22010|添加小费失败|