版权所有©,上海海鼎信息工程股份有限公司,2016-2025,保留所有权利。
1. 接口定义
1.1. 配送方案服务
1.1.1. 查询配送范围列表
POST /{tenant_id}/eshop/carrierschemeruleservice/carrier/scopes
1.1.1.1. 说明
查询配送范围列表
1.1.1.2. 参数
类型 | 名称 | 说明 | 类型 |
---|---|---|---|
Path |
tenant_id |
租户Id |
string |
Query |
carrier_id |
承运商ID:fengniao、meituan |
string |
Body |
storeIds |
门店列表,门店数量不能大于100 |
< string > array |
1.1.1.3. 响应
HTTP代码 | 说明 | 类型 |
---|---|---|
200 |
successful operation |
< CarrierScope > array |
1.1.1.4. HTTP请求示例
请求 path
/string/eshop/carrierschemeruleservice/carrier/scopes
请求 body
[ "string" ]
1.1.1.5. HTTP响应示例
响应 200
[ {
"type" : "meituan",
"coordinates" : [ {
"type" : "GCJ02",
"latitude" : 118.5,
"longtitude" : 60.2,
"range_id" : "0,1,2",
"range_name" : "快递配送",
"range_no" : "1,2"
} ],
"carrier_id" : "meituan",
"carrier_merchant_id" : "02",
"shop_id" : "10",
"store_id" : "3243545"
} ]
1.1.2. 获取平台门店配送方案
GET /{tenant_id}/eshop/carrierschemeruleservice/schemerule
1.1.2.1. 说明
获平台门店配送方案
1.1.2.2. 参数
类型 | 名称 | 说明 | 类型 |
---|---|---|---|
Path |
tenant_id |
租户Id |
string |
Query |
platform_id |
平台ID |
string |
Query |
shop_id |
平台商家ID |
string |
Query |
store_id |
门店ID |
string |
1.1.2.3. 响应
HTTP代码 | 说明 | 类型 |
---|---|---|
200 |
successful operation |
1.1.2.4. HTTP请求示例
请求 path
/string/eshop/carrierschemeruleservice/schemerule?platform_id=string&shop_id=string&store_id=string
1.1.2.5. HTTP响应示例
响应 200
{
"source" : "store",
"state" : "applying",
"schemes" : [ {
"selectCoordinate" : "1,2",
"scope" : {
"type" : "meituan",
"coordinates" : [ {
"type" : "GCJ02",
"latitude" : 118.5,
"longtitude" : 60.2,
"range_id" : "0,1,2",
"range_name" : "快递配送",
"range_no" : "1,2"
} ],
"carrier_id" : "meituan",
"carrier_merchant_id" : "02",
"shop_id" : "10",
"store_id" : "3243545"
},
"freight" : 2.0,
"scope_source" : "meituan",
"carrier_merchant_id" : "meituan",
"min_amount" : 5.25,
"max_weight" : 2.0,
"package_amount" : 0.0,
"self_package_amount" : 0.0,
"self_order_no_feight" : true,
"freight_decs" : [ {
"type" : "string",
"conditions" : [ {
"min_value" : "2",
"max_value" : "3",
"dec_value" : 3.0,
"free_shipping" : true
} ]
} ],
"freight_incs" : [ {
"type" : "distance",
"conditions" : [ {
"min_value" : "2",
"max_value" : "3",
"per_value" : 2.0,
"inc_value" : 3.0
} ]
} ]
} ],
"platform_id" : "meituan",
"shop_id" : "3243",
"store_id" : "32345355"
}
1.1.3. 获取配送方案列表
POST /{tenant_id}/eshop/carrierschemeruleservice/schemes
1.1.3.1. 说明
获取配送方案
1.1.3.2. 参数
类型 | 名称 | 说明 | 类型 |
---|---|---|---|
Path |
tenant_id |
租户Id |
string |
Body |
filter |
方案过滤条件 |
1.1.3.3. 响应
HTTP代码 | 说明 | 类型 |
---|---|---|
200 |
successful operation |
< CarrierScheme > array |
1.1.3.4. HTTP请求示例
请求 path
/string/eshop/carrierschemeruleservice/schemes
请求 body
{
"store_id" : "0001",
"scope_source" : "fengniao"
}
1.1.3.5. HTTP响应示例
响应 200
[ {
"selectCoordinate" : "1,2",
"scope" : {
"type" : "meituan",
"coordinates" : [ {
"type" : "GCJ02",
"latitude" : 118.5,
"longtitude" : 60.2,
"range_id" : "0,1,2",
"range_name" : "快递配送",
"range_no" : "1,2"
} ],
"carrier_id" : "meituan",
"carrier_merchant_id" : "02",
"shop_id" : "10",
"store_id" : "3243545"
},
"freight" : 2.0,
"scope_source" : "meituan",
"carrier_merchant_id" : "meituan",
"min_amount" : 5.25,
"max_weight" : 2.0,
"package_amount" : 0.0,
"self_package_amount" : 0.0,
"self_order_no_feight" : true,
"freight_decs" : [ {
"type" : "string",
"conditions" : [ {
"min_value" : "2",
"max_value" : "3",
"dec_value" : 3.0,
"free_shipping" : true
} ]
} ],
"freight_incs" : [ {
"type" : "distance",
"conditions" : [ {
"min_value" : "2",
"max_value" : "3",
"per_value" : 2.0,
"inc_value" : 3.0
} ]
} ]
} ]
2. 定义
2.1. CarrierScheme
配送方案
名称 | 说明 | 类型 |
---|---|---|
carrier_merchant_id |
承运商家选择 |
string |
freight |
基础运费 |
number |
freight_decs |
运费扣减 |
< FreightDeduction > array |
freight_incs |
动态定价 |
< FreightIncrement > array |
max_weight |
重量限制,单位g |
number |
min_amount |
起送金额 |
number |
package_amount |
包装费 |
number |
scope |
配送范围,获取门店配送方案(门店维度)级联出配送范围 |
|
scope_source |
配送范围来源:meituan(美团快递)… |
string |
selectCoordinate |
配送范围选择range_no |
string |
self_order_no_feight |
自提订单免起送价 |
boolean |
self_package_amount |
自提包装费 |
number |
2.2. CarrierSchemeFilter
配送方案过滤器
名称 | 说明 | 类型 |
---|---|---|
scope_source |
配送范围来源:fengniao、meituan |
string |
store_id |
门店ID |
string |
2.3. CarrierSchemeRule
门店配送方案规则
名称 | 说明 | 类型 |
---|---|---|
platform_id |
平台ID |
string |
schemes |
配送方案列表 |
< CarrierScheme > array |
shop_id |
平台商家ID |
string |
source |
来源:store(门店)、shop(商家),可能为空,保存不需要传,获取时该字段区分方案的维度 |
string |
state |
状态:applying(开通中)、opened(已开通) |
enum (applying, opened) |
store_id |
门店ID |
string |
2.4. CarrierScope
承运范围
名称 | 说明 | 类型 |
---|---|---|
carrier_id |
承运商ID |
string |
carrier_merchant_id |
承运平台商家 |
string |
coordinates |
坐标范围 |
< Coordinate > array |
shop_id |
平台商家ID |
string |
store_id |
门店Id |
string |
type |
承运类型 |
string |
2.5. Coordinate
坐标范围
名称 | 说明 | 类型 |
---|---|---|
latitude |
纬度 |
number |
longtitude |
经度 |
number |
range_id |
标识id,可以认为是一个分组 |
string |
range_name |
名称 |
string |
range_no |
范围序号 |
string |
type |
坐标类型:BD09(百度坐标)、GCJ02(火星坐标)、WGS84(WGS84坐標) |
string |
2.6. DeductionCondition
名称 | 说明 | 类型 |
---|---|---|
dec_value |
扣减量,(eg:加价3元,3即扣减量) |
number |
free_shipping |
包邮 |
boolean |
max_value |
条件最大值 |
string |
min_value |
条件最小值 |
string |
2.7. FreightDeduction
运费满减
名称 | 说明 | 类型 |
---|---|---|
conditions |
扣减条件(规则) |
< DeductionCondition > array |
type |
样例 : |
string |
2.8. FreightIncrement
运费加价
名称 | 说明 | 类型 |
---|---|---|
conditions |
加价条件(规则) |
< IncrementCondition > array |
type |
加价类型:distance(距离加价)、time_slot(时段加价)、weight(重量加价) |
string |
2.9. IncrementCondition
加价条件
名称 | 说明 | 类型 |
---|---|---|
inc_value |
增加量,(eg:加价3元,3即增加量) |
number |
max_value |
条件最大值,距离加价和重量加价时为数字(最多1位小数),时段加价格式为HH:mm |
string |
min_value |
条件最小值,距离加价和重量加价时为数字(最多1位小数),时段加价格式为HH:mm |
string |
per_value |
每单位值,(目前重量加价有此值,eg:重量加价时,每2kg加价1元,2即每单位值) |
number |