版权所有©,上海海鼎信息工程股份有限公司,2016-2025,保留所有权利。
1. 接口定义
1.1. 对账管理-公开服务
1.1.1. 上传订单商品明细结算数据
POST /{tenant_id}/soms/ordersettleservice/item/upload
1.1.1.1. 说明
上传订单商品明细结算数据
1.1.1.2. 参数
| 类型 | 名称 | 说明 | 类型 |
|---|---|---|---|
Path |
tenant_id |
租户ID |
string |
Query |
operator |
操作人 |
string |
Body |
bills |
订单商品明细结算数据列表 |
1.1.1.3. 响应
| HTTP代码 | 说明 | 类型 |
|---|---|---|
200 |
successful operation |
1.1.1.4. HTTP请求示例
请求 path
/string/soms/ordersettleservice/item/upload?operator=string
请求 body
{
"orders" : [ {
"items" : [ {
"created" : "2020-06-17 10:00:00",
"modified" : "2020-06-17 10:00:00",
"creator" : "string",
"modifier" : "string",
"total" : 20.0,
"amount" : 33.0,
"item_id" : "212121212",
"platform_id" : "meituan",
"shop_id" : "43435",
"station_id" : "43435",
"station_name" : "西店",
"order_id" : "323232323",
"sku_id" : "43434",
"item_no" : "1",
"order_created" : "2018-12-07 14:34:00",
"front_sku_id" : "3230",
"front_price" : 12.0,
"front_discount_radio" : 0.0,
"front_discount_amount" : 2.0,
"front_score_amount" : 2.0,
"quantity" : 12.0,
"price" : 33.0,
"unit_price" : 32.0,
"discount_radio" : 0.0,
"discount_amount" : 12.0,
"pay_amount" : 12.0,
"fav_amount" : 12.0,
"discounts" : [ {
"type" : "item",
"act_id" : "343434",
"act_name" : "string",
"front_discount_type_id" : "3234",
"front_discount_type_name" : "string",
"front_discount_detail_type_id" : "2222",
"front_discount_detail_type_name" : "string",
"front_amount" : 333.0,
"discount_amount" : 5.0,
"radio" : 0.0,
"amount" : 2.0
} ]
} ],
"order_id" : "212121212"
} ]
}
1.1.1.5. HTTP响应示例
响应 200
{
"success" : true,
"code" : "string",
"message" : "string"
}
1.1.2. 查询指定订单商品明细结算数据
POST /{tenant_id}/soms/ordersettleservice/ordersettles/item/query
1.1.2.1. 说明
查询指定订单商品明细结算数据
1.1.2.2. 参数
| 类型 | 名称 | 说明 | 类型 |
|---|---|---|---|
Path |
tenant_id |
租户ID |
string |
Query |
desc |
是否倒序 |
boolean |
Query |
page |
页码,必须大于等于0 |
integer (int32) |
Query |
page_size |
分页大小,查询分页大小必须在[0,1000] |
integer (int32) |
Query |
sort_key |
排序字段 目前没有可支持的值 不传默认orderId |
string |
Body |
filter |
查询过滤器 |
1.1.2.3. 响应
| HTTP代码 | 说明 | 类型 |
|---|---|---|
200 |
successful operation |
1.1.2.4. HTTP请求示例
请求 path
/string/soms/ordersettleservice/ordersettles/item/query?desc=true&page=0&page_size=0
请求 body
{
"platform_id_eq" : "meituan",
"shop_id_eq" : "15154",
"order_id_eq" : "323243434",
"item_id_in" : [ "string" ]
}
1.1.2.5. HTTP响应示例
响应 200
{
"total" : 100,
"page" : 0,
"items" : [ {
"created" : "2020-06-17 10:00:00",
"modified" : "2020-06-17 10:00:00",
"creator" : "string",
"modifier" : "string",
"total" : 20.0,
"amount" : 33.0,
"item_id" : "212121212",
"platform_id" : "meituan",
"shop_id" : "43435",
"station_id" : "43435",
"station_name" : "西店",
"order_id" : "323232323",
"sku_id" : "43434",
"item_no" : "1",
"order_created" : "2018-12-07 14:34:00",
"front_sku_id" : "3230",
"front_price" : 12.0,
"front_discount_radio" : 0.0,
"front_discount_amount" : 2.0,
"front_score_amount" : 2.0,
"quantity" : 12.0,
"price" : 33.0,
"unit_price" : 32.0,
"discount_radio" : 0.0,
"discount_amount" : 12.0,
"pay_amount" : 12.0,
"fav_amount" : 12.0,
"discounts" : [ {
"type" : "item",
"act_id" : "343434",
"act_name" : "string",
"front_discount_type_id" : "3234",
"front_discount_type_name" : "string",
"front_discount_detail_type_id" : "2222",
"front_discount_detail_type_name" : "string",
"front_amount" : 333.0,
"discount_amount" : 5.0,
"radio" : 0.0,
"amount" : 2.0
} ]
} ],
"page_count" : 10,
"page_size" : 10
}
1.1.3. 查询指定对账数据
POST /{tenant_id}/soms/ordersettleservice/ordersettles/query
1.1.3.1. 说明
查询指定对账数据
1.1.3.2. 参数
| 类型 | 名称 | 说明 | 类型 |
|---|---|---|---|
Path |
tenant_id |
租户ID |
string |
Query |
desc |
是否倒序 |
boolean |
Query |
page |
页码,必须大于等于0 |
integer (int32) |
Query |
page_size |
查询分页大小必须在[0,1000] |
integer (int32) |
Query |
sort_key |
排序字段 id 不传默认orderId |
string |
Body |
filter |
查询过滤器 |
1.1.3.3. 响应
| HTTP代码 | 说明 | 类型 |
|---|---|---|
200 |
successful operation |
1.1.3.4. HTTP请求示例
请求 path
/string/soms/ordersettleservice/ordersettles/query?desc=true&page=0&page_size=0
请求 body
{
"ids" : [ "string" ],
"platform_id_eq" : "meituan",
"shop_id_eq" : "323443",
"order_id_eq" : "323345354",
"station_id_eq" : "0001",
"sp_store_id_eq" : "0001",
"order_id_in" : [ "string" ],
"created_start" : "2019-08-07 19:49:36",
"created_end" : "2019-08-07 19:49:36",
"modified_start" : "2019-08-07 19:49:36",
"modified_end" : "2019-08-07 19:49:36",
"id_end_no_equal" : "string",
"order_ids" : [ "string" ],
"platform_id_in" : [ "string" ],
"station_id_in" : [ "string" ],
"order_start_with" : "string",
"front_type_name_start_with" : "string",
"front_type_name_eq" : "string",
"settle_date_start" : "2019-08-07 19:49:36",
"settle_date_end" : "2019-08-07 19:49:36"
}
1.1.3.5. HTTP响应示例
响应 200
{
"total" : 100,
"page" : 0,
"items" : [ {
"created" : "2020-06-17 10:00:00",
"modified" : "2020-06-17 10:00:00",
"creator" : "string",
"modifier" : "string",
"total" : 22.0,
"discount" : 2.0,
"amount" : 22.0,
"freight" : 0.0,
"discounts" : [ {
"type" : "item",
"act_id" : "343434",
"act_name" : "string",
"front_discount_type_id" : "3234",
"front_discount_type_name" : "string",
"front_discount_detail_type_id" : "2222",
"front_discount_detail_type_name" : "string",
"front_amount" : 333.0,
"discount_amount" : 5.0,
"radio" : 0.0,
"amount" : 2.0
} ],
"settle_id" : "68785680023933117_1",
"front_settle_id" : "687856800239331",
"platform_id" : "meituan",
"shop_id" : "2123",
"station_id" : "212123",
"station_name" : "2323",
"sp_store_id" : "2323",
"front_type_id" : "1",
"front_type_name" : "外卖订单",
"sub_front_type_id" : "1",
"sub_front_type_name" : "外卖订单",
"delivery_type_id" : "string",
"delivery_type_name" : "string",
"order_id" : "132344",
"front_state" : "8",
"settle_date" : "2019-08-07 00:00:00",
"order_created" : "2019-08-07 00:00:00",
"order_finish_time" : "2019-08-07 00:00:00",
"refund_id" : "323434343",
"refund_time" : "2019-08-07 00:00:00",
"package_box" : 2.0,
"package_fee" : 1.0,
"shop_package_fee" : 1.0,
"other_fees" : [ {
"type" : "delivery_tips",
"fee" : 21.0
} ],
"discount_amount" : 2.0,
"settle_discount" : 2.0,
"shop_discount" : 2.0,
"shop_freight_discount" : 0.0,
"freight_discount" : 0.0,
"settle_state" : "已入账",
"settle_amount" : 2.0,
"settle" : 22.0,
"settle_commission" : 2.0,
"selttle_commission" : 2.0,
"settle_freight" : 120.01,
"performance_service_fee" : 2.0,
"platform_service_fee" : 2.0,
"platform_service_rate" : 0.02,
"bottom_service_fee" : 2.0,
"platform_freight_discount" : 0.0,
"pay_amount" : 22.0,
"cod_amount" : 0.0,
"freight_commission" : 0.0,
"platform_promotion_settle" : 0.0,
"platform_subsidy_suspend" : 0.0,
"invoice_fee" : 0.0,
"donation_amount" : 0.0,
"other_amount" : 0.0
} ],
"page_count" : 10,
"page_size" : 10
}
1.1.4. 上传对账数据
POST /{tenant_id}/soms/ordersettleservice/upload
1.1.4.1. 说明
上传对账数据
1.1.4.2. 参数
| 类型 | 名称 | 说明 | 类型 |
|---|---|---|---|
Path |
tenant_id |
租户ID |
string |
Query |
operator |
操作人 |
string |
Body |
bills |
订单结算单列表对象 |
1.1.4.3. 响应
| HTTP代码 | 说明 | 类型 |
|---|---|---|
200 |
successful operation |
1.1.4.4. HTTP请求示例
请求 path
/string/soms/ordersettleservice/upload?operator=string
请求 body
{
"items" : [ {
"created" : "2020-06-17 10:00:00",
"modified" : "2020-06-17 10:00:00",
"creator" : "string",
"modifier" : "string",
"total" : 22.0,
"discount" : 2.0,
"amount" : 22.0,
"freight" : 0.0,
"discounts" : [ {
"type" : "item",
"act_id" : "343434",
"act_name" : "string",
"front_discount_type_id" : "3234",
"front_discount_type_name" : "string",
"front_discount_detail_type_id" : "2222",
"front_discount_detail_type_name" : "string",
"front_amount" : 333.0,
"discount_amount" : 5.0,
"radio" : 0.0,
"amount" : 2.0
} ],
"settle_id" : "68785680023933117_1",
"front_settle_id" : "687856800239331",
"platform_id" : "meituan",
"shop_id" : "2123",
"station_id" : "212123",
"station_name" : "2323",
"sp_store_id" : "2323",
"front_type_id" : "1",
"front_type_name" : "外卖订单",
"sub_front_type_id" : "1",
"sub_front_type_name" : "外卖订单",
"delivery_type_id" : "string",
"delivery_type_name" : "string",
"order_id" : "132344",
"front_state" : "8",
"settle_date" : "2019-08-07 00:00:00",
"order_created" : "2019-08-07 00:00:00",
"order_finish_time" : "2019-08-07 00:00:00",
"refund_id" : "323434343",
"refund_time" : "2019-08-07 00:00:00",
"package_box" : 2.0,
"package_fee" : 1.0,
"shop_package_fee" : 1.0,
"other_fees" : [ {
"type" : "delivery_tips",
"fee" : 21.0
} ],
"discount_amount" : 2.0,
"settle_discount" : 2.0,
"shop_discount" : 2.0,
"shop_freight_discount" : 0.0,
"freight_discount" : 0.0,
"settle_state" : "已入账",
"settle_amount" : 2.0,
"settle" : 22.0,
"settle_commission" : 2.0,
"selttle_commission" : 2.0,
"settle_freight" : 120.01,
"performance_service_fee" : 2.0,
"platform_service_fee" : 2.0,
"platform_service_rate" : 0.02,
"bottom_service_fee" : 2.0,
"platform_freight_discount" : 0.0,
"pay_amount" : 22.0,
"cod_amount" : 0.0,
"freight_commission" : 0.0,
"platform_promotion_settle" : 0.0,
"platform_subsidy_suspend" : 0.0,
"invoice_fee" : 0.0,
"donation_amount" : 0.0,
"other_amount" : 0.0
} ]
}
1.1.4.5. HTTP响应示例
响应 200
{
"success" : true,
"code" : "string",
"message" : "string"
}
2. 定义
2.1. ActionResult
| 名称 | 说明 | 类型 |
|---|---|---|
code |
样例 : |
string |
message |
样例 : |
string |
success |
默认值 : |
boolean |
2.2. OrderFee
订单费用
| 名称 | 说明 | 类型 |
|---|---|---|
fee |
费用 |
number |
type |
类型:platform_service_fee(平台服务费),performance_service_fee(履约服务费),delivery_extra_fee(配送费),delivery_tips(配送小费),tips(小费),cold_chain_processing_fee(冷链加工费),carrier_call_fee(众包呼单费),carrier_call_tips(呼单小费) |
string |
2.3. OrderSettle
订单结算单
| 名称 | 说明 | 类型 |
|---|---|---|
amount |
客户实付金额 |
number |
bottom_service_fee |
保底服务费 |
number |
cod_amount |
货到付款金额 |
number |
created |
样例 : |
string (date-time) |
creator |
样例 : |
string |
delivery_type_id |
配送方式id |
string |
delivery_type_name |
配送方式名称 |
string |
discount |
商家优惠金额 |
number |
discount_amount |
优惠总金额 |
number |
discounts |
订单级优惠详情 |
< OrderSettleItemDiscount > array |
donation_amount |
公益捐款 |
number |
freight |
原运费 |
number |
freight_commission |
运费佣金 |
number |
freight_discount |
运费优惠金额 |
number |
front_settle_id |
平台对账ID |
string |
front_state |
平台单据状态 |
string |
front_type_id |
单据类型ID,不同平台ID不同 |
string |
front_type_name |
单据类型名称,不同平台名称不同 |
string |
invoice_fee |
开票金额 |
number |
modified |
样例 : |
string (date-time) |
modifier |
样例 : |
string |
order_created |
下单时间 |
string (date-time) |
order_finish_time |
完成时间 |
string (date-time) |
order_id |
订单ID |
string |
other_amount |
其他金额 |
number |
other_fees |
其他费用 |
< OrderFee > array |
package_box |
原餐盒费 |
number |
package_fee |
原打包费 |
number |
pay_amount |
付款金额 |
number |
performance_service_fee |
履约服务费 |
number |
platform_freight_discount |
平台运费优惠金额 |
number |
platform_id |
平台ID |
string |
platform_promotion_settle |
平台推广结算 |
number |
platform_service_fee |
平台服务费 |
number |
platform_service_rate |
平台服务费率,记小数,举例:0.02=20% |
number |
platform_subsidy_suspend |
平台补贴暂扣 |
number |
refund_id |
平台退款ID |
string |
refund_time |
退款时间 |
string (date-time) |
selttle_commission |
平台结算佣金,拼写错误,建议使用:settle_commission |
number |
settle |
结算金额 |
number |
settle_amount |
平台结算金额(商家应收款) |
number |
settle_commission |
平台结算佣金 |
number |
settle_date |
结账日期 |
string (date-time) |
settle_discount |
平台结算优惠金额,平台优惠补贴 |
number |
settle_freight |
平台结算运费 |
number |
settle_id |
对账ID |
string |
settle_state |
结算状态:已入账|未入账 |
string |
shop_discount |
商家商品优惠金额贴 |
number |
shop_freight_discount |
商家运费优惠金额贴 |
number |
shop_id |
平台商家ID |
string |
shop_package_fee |
商家打包费 |
number |
sp_store_id |
平台门店ID |
string |
station_id |
配送门店ID |
string |
station_name |
配送门店名称 |
string |
sub_front_type_id |
单据子类型ID,不同平台ID不同 |
string |
sub_front_type_name |
单据子类型名称,不同平台名称不同 |
string |
total |
原商品金额 |
number |
2.4. OrderSettleFilter
查询指定对账数据过滤器
| 名称 | 说明 | 类型 |
|---|---|---|
created_end |
创建时间结束于 |
string (date-time) |
created_start |
创建时间起始于 |
string (date-time) |
front_type_name_eq |
账单类型等于 |
string |
front_type_name_start_with |
账单类型起始于 |
string |
id_end_no_equal |
对账ID小于 |
string |
ids |
对账id数组 |
< string > array |
modified_end |
最后修改时间结束于 |
string (date-time) |
modified_start |
最后修改时间起始于 |
string (date-time) |
order_id_eq |
订单ID等于 |
string |
order_id_in |
订单ID数组 |
< string > array |
order_ids |
订单ID数组 |
< string > array |
order_start_with |
订单ID起始于 |
string |
platform_id_eq |
平台ID等于 |
string |
platform_id_in |
平台ID数组 |
< string > array |
settle_date_end |
账单日期结束于 |
string (date-time) |
settle_date_start |
账单日期起始于 |
string (date-time) |
shop_id_eq |
平台商家ID等于 |
string |
sp_store_id_eq |
平台门店ID等于 |
string |
station_id_eq |
门店ID等于 |
string |
station_id_in |
门店ID数组 |
< string > array |
2.5. OrderSettleItemDiscount
订单级优惠详情
| 名称 | 说明 | 类型 |
|---|---|---|
act_id |
活动代码 |
string |
act_name |
活动名称 |
string |
amount |
商家承担金额 |
number |
discount_amount |
优惠金额 |
number |
front_amount |
平台承担金额 |
number |
front_discount_detail_type_id |
平台优惠类型详情ID |
string |
front_discount_detail_type_name |
平台优惠类型详情名称 |
string |
front_discount_type_id |
平台优惠类型ID |
string |
front_discount_type_name |
平台优惠类型名称 |
string |
radio |
商家承担比例,[0,1] |
number |
type |
类型:order,item |
string |
2.6. OrderSettleItemFilter
查询指定订单明细结算数据过滤器
| 名称 | 说明 | 类型 |
|---|---|---|
item_id_in |
明细行ID列表 |
< string > array |
order_id_eq |
订单ID等于 |
string |
platform_id_eq |
平台ID等于 |
string |
shop_id_eq |
平台商家ID等于 |
string |
2.7. OrderSettleItemOrderList
明细结算数据列表对象
| 名称 | 说明 | 类型 |
|---|---|---|
orders |
明细结算数据列表 |
< 明细结算数据列表 > array |
2.8. OrderSettleItemPaging
订单明细结算数据查询对象
| 名称 | 说明 | 类型 |
|---|---|---|
items |
订单明细结算数据列表 |
< 订单明细结算数据 > array |
page |
页码 |
integer (int32) |
page_count |
页数 |
integer (int32) |
page_size |
分页大小 |
integer (int32) |
total |
总记录数 |
integer (int64) |
2.9. OrderSettleList
订单结算单列表对象
| 名称 | 说明 | 类型 |
|---|---|---|
items |
订单结算单列表 |
< OrderSettle > array |
2.10. OrderSettlePaging
对账数据查询对象
| 名称 | 说明 | 类型 |
|---|---|---|
items |
订单结算单列表 |
< OrderSettle > array |
page |
页码 |
integer (int32) |
page_count |
页数 |
integer (int32) |
page_size |
分页大小 |
integer (int32) |
total |
总记录数 |
integer (int64) |
2.11. 明细结算数据列表
| 名称 | 说明 | 类型 |
|---|---|---|
items |
订单明细结算数据 |
< 订单明细结算数据 > array |
order_id |
订单ID |
string |
2.12. 订单明细结算数据
| 名称 | 说明 | 类型 |
|---|---|---|
amount |
商品金额 |
number |
created |
样例 : |
string (date-time) |
creator |
样例 : |
string |
discount_amount |
商家承担金额 |
number |
discount_radio |
商家承担比例 |
number |
discounts |
订单级优惠列表 |
< OrderSettleItemDiscount > array |
fav_amount |
优惠总金额 |
number |
front_discount_amount |
平台承担金额 |
number |
front_discount_radio |
平台承担比例 |
number |
front_price |
平台商品价格 |
number |
front_score_amount |
平台积分金额 |
number |
front_sku_id |
平台商品编码 |
string |
item_id |
结算行id |
string |
item_no |
行号 |
string |
modified |
样例 : |
string (date-time) |
modifier |
样例 : |
string |
order_created |
下单时间 |
string (date-time) |
order_id |
订单ID |
string |
pay_amount |
顾客实付金额 |
number |
platform_id |
平台ID |
string |
price |
价格 |
number |
quantity |
数量 |
number |
shop_id |
店铺ID |
string |
sku_id |
商品平台编码 |
string |
station_id |
门店代码 |
string |
station_name |
门店名称 |
string |
total |
商品原价总金额 |
number |
unit_price |
原价 |
number |