订单附件批量保存
- 接口:/common/orderAttach/batch
- Method:POST
- 数据格式:JSON
- 接口说明:批量保存订单附件,主键为source&orderId&type&fileName
参数:
请求参数
字段 |
类型 |
释义 |
是否必填 |
bizId |
String |
当前次接口同步的唯一标识(UUID) |
Y |
timestamp |
Long |
当前次接口同步时间对应的时间戳(TIMESTAMP) |
Y |
data |
List |
请求数据体 |
Y |
OrderAttachmentVo:
字段名称 |
字段类型 |
字段描述 |
是否必填 |
code |
String |
唯一编码,用source_orderId_type_fileName的形式 |
是 |
source |
String |
渠道名称 |
是 |
source_type |
String |
产品类型 |
否 |
attachment_url |
String |
文件地址(上传s3后返回的地址) |
是 |
file_name |
String |
附件的文件名 |
是 |
order_id |
String |
订单号 |
是 |
type |
String |
附件类型 |
是 |
description |
String |
描述信息 |
否 |
data |
Object |
票据原始数据 |
否 |
detail |
Object |
票据格式化后的信息 |
否 |
detail字段说明:
detail字段包含票据格式化后的信息,不同附件类型包含的字段如下:
字段名称 |
字段类型 |
字段描述 |
是否必填 |
amount |
Bigdecimal |
总金额 |
否 |
bind_id |
String |
绑定ID |
否 |
user_id |
Integer |
用户ID |
否 |
order_list |
Array |
订单列表 |
否 |
passenger_name |
String |
乘客姓名 |
否 |
attachment_type |
String |
附件类型,可选值:itinerary(行程单)、invoice(发票) |
否 |
amount_without_tax |
Bigdecimal |
不含税金额 |
否 |
invoice_type |
String |
发票类型,可选值:service_price(服务费),additional_price(增值包金额),refund_change_price(退改费发票)登 |
否 |
示例:
请求数据
{
"bizId": "D026C2E5EB4449909AD452F75C2F3FAE",
"timestamp": 202407081707457,
"data": [
{
"code": "ctrip_32369548858_receipt_测试文件名",
"attachment_url": "test/url/测试/v2",
"file_name": "测试文件名",
"source": "ctrip",
"source_type": "flight",
"order_id": "32369548858",
"type": "receipt",
"description": "测试的描述信息v2",
"detail": {
"amount": 550.0,
"bind_id": "00027823",
"user_id": 184850,
"order_list": ["1132538683244xxx"],
"passenger_name": "张三",
"attachment_type": "itinerary",
"amount_without_tax": 508.71
},
"data": {}
}
]
}
返回数据
{
"resCode": 200000,
"resMsg": "success",
"bizId": "D026C2E5EB4449909AD452F75C2F3FAE",
"data": {
"validatorErrors": {},
"created": "此次请求新建成功了0条数据",
"dbErrors": [],
"updated": "此次请求更新成功了1条数据"
}
}