参数名称 | 类型 | 说明 |
method | string | 接口方法,如:获取单个订单:getOrder |
format | string | 接口返回格式,目前只支持 json |
timestamp | long | 请求接口的时间,从1970-1-1 00:00:00 到当前时间的毫秒数 |
access_token | string | OAuth 授权模式的 Access Token |
参数名称 | 类型 | 说明 |
rt | int | 错误码 |
success | boolean | 是否成功 |
msg | string | 描述 |
OAuth2.0
拼接登录授权url给商家登录授权,如下:
/oauth2/oauth_h?cmd=getAuthCode&client_id=xxx&platform_code=FKW
&redirect_uri=xxx&state=1,商家通过上面登录授权后带上code重定向到约定时的redirect_uri,如:redirect_uri?code=xxx&state=xxx
接口调用请求说明:
http请求方式:GET
旧请求地址:https://waybill.api.jz.fkw.com/oauth2/oauth_h?
cmd=getAuthCode&client_id=xxx&platform_code=FKW&redirect_uri=xxx&state=xxx
新请求地址:https://waybill.api.jz.fkw.com/api/oauth
/getAuthCode?cmd=getAuthCode&client_id=xxx&platform_code=FKW&redirect_uri=xxx&state=xxx
请求参数说明:
参数名称 | 类型 | 必须 | 说明 |
client_id | string | true | 对接时约定 |
platform_code | string | true | 平台code;可选值: FKW (直销) WSC (分销) |
redirect_uri | string | true | 请使用约定的url,并使用urlEncode对链接进行处理 |
state | string | false | 自定义 |
商家登录授权步骤如下:
1. 第三方平台构建授权链接放置自己的网站,商家点击后,重定向到我来登录页面;
2. 进行登录,登录成功会跳转到授权页面;
3. 选择需要授权的站点,然后点击【确定授权】;
4. 商家授权确认之后,授权页会自动跳转进入回调 URI,并在 URL 参数中返回授权码(redirect_url?code=xxx&state=xxx)
商家通过oauth登录授权后会调用平台约定的tokenUrl 换token,如下: tokenUrl为 /oauth2/access_token,那么第三方平台将以下参数post到该tokenUrl换取access token
接口调用请求说明:
http请求方式:POST
旧请求地址:https://waybill.api.jz.fkw.com/oauth/access_token?client_id=xxx
&client_secret=xxx&grant_type=authorization_code&code=xxx
新请求地址:https://waybill.api.jz.fkw.com/api/oauth/getAccessToken?client_id=xxx
&client_secret=xxx&grant_type=authorization_code&code=xxx
请求参数说明:
参数名称 | 类型 | 必须 | 说明 |
client_id | string | true | 对接时约定 |
client_secret | string | true | 对接时约定 |
grant_type | string | true | 固定填写authorization_code |
code | string | true | 授权登录获取到的code,过期时间10分钟 |
以json格式返回,格式如下
{
"shop_id": "11039290",
"shop_name": "xxx",
"user_id": "11039290",
"re_expires_in": 2419200,
"expires_in": 7200,
"token_type": "xxx",
"refresh_token": "pVAB0H8yC48cDkEOKY_Bq67_4VxEetSuX5QC8rIo",
"access_token": "xn-9lDOA6HjvTpimEw3WzGNdz7LrSeX_rJxeBP20",
"platform_code": "FKW"
}
回包参数说明:
参数名称 | 类型 | 说明 |
shop_id | string | 店铺id,确保** |
shop_name | string | 店铺名称 |
user_id | String | 用户id |
re_expires_in | Number | Refresh Token过期时间,单位为秒, 例如10(表示10秒后过期,有效期为28天) |
expires_in | Number | Access Token过期时间,单位为秒, 例如10(表示10秒后过期,有效期为2小时) |
refresh_token | string | Refresh Token |
access_token | string | Access Token, |
token_type | string | 第三方认证平台类型 |
platform_code | string | 店铺平台类型;有FKW(直销)和WSC(分销)两个值 |
以json格式返回,格式如下
{
"rt": 100,
"success": false,
"msg": "授权码已过期。"
}
通过授权获取的refresh_token(前置条件:re_expires_in>0)可用来刷新access token的时长,如下: tokenUrl为 /oauth2/access_token,第三方平台将以下参数以post的请求方式发送refresh token url刷新access token时长
接口调用请求说明:
http请求方式:POST
旧请求地址:https://waybill.api.jz.fkw.com/oauth2/access_token?client_id=xxx
&client_secret=xxx&grant_type=refresh_token&refresh_token=xxx
新请求地址:https://waybill.api.jz.fkw.com/api/oauth/refreshAccessToken?client_id=xxx
&client_secret=xxx&grant_type=refresh_token&refresh_token=xxx
请求参数说明:
参数名称 | 类型 | 必须 | 说明 |
client_id | string | true | 对接时约定 |
client_secret | string | true | 对接时约定 |
grant_type | string | tue | 固定填写refresh_token |
refresh_token | string | true | 2.2获取到的refresh_token |
返回内容与1.2.1 一致
返回内容与1.2.2 一致
method:getProductList
说明:默认以产品创建时间降序排序
接口调用请求说明:
http请求方式:GET
旧请求地址:https://waybill.api.jz.fkw.com?access_token=xxx&method=getProductList
&page_no=1&page_size=200
新请求地址:https://waybill.api.jz.fkw.com/api/product/getList?access_token=xxx
&method=getProductList&page_no=1&page_size=200
参数名称 | 类型 | 必须 | 说明 |
page_no | int | true | 页码 |
page_size | int | true | 每页返回数(**页数为200) |
{
'page_no':1,
'page_size':200
}
参数名称 | 类型 | 说明 |
product_list | Product [ ] | 当前页商品列表 |
total | int | 商品总数 |
Product
参数名称 | 类型 | 说明 |
id | string | 商品id |
name | string | 商品名称 |
picture | string | 商品图片 |
create_time | string | 商品创建时间,格式”yyyy-MM-dd” |
update_time | string | 商品修改时间,格式”yyyy-MM-dd” |
on_shelf | boolean | 是否上架;true为上架,false为下架 |
sku_list | Sku[] | sku列表 |
Sku
参数名称 | 类型 | 说明 |
sku_id | string | skuid |
price | double | sku价格 |
properties_name | string | Sku属性名称,如 颜色:白色;尺码:XXL |
stock | int | sku库存 |
product_code | string | 产品编码 |
{
"rt":0,
"success":true,
"msg": "查询成功",
'product_list': [
{
'id': '1',
'name': '商品1',
'code': 'code',
'picture': 'url',
'create_time': '2020-01-01',
'sku_list': [
{
'sku_id':'1_1',
'price':1,
"properties_name": "颜色:白色;尺码:XXL",
'stock':10,
'product_code':'bilibili'
}
......
]
}
......
]
}
method:updateStock
接口调用请求说明:
http请求方式:POST
旧请求地址:https://waybill.api.jz.fkw.com?access_token=xxx&method=updateStock
&product_id=1&sku_id=1_1&stock_amount=10
新请求地址:https://waybill.api.jz.fkw.com/api/product/updateStock?access_token=xxx
&method=updateStock&product_id=1&sku_id=1_1&stock_amount=10
参数名称 | 类型 | 必须 | 说明 |
product_id | int | true | 产品id |
sku_id | string | true | skuid |
stock_amount | int | true | 修改的库存数 |
{
"product_id": "1",
"sku_id": "1_1",
"stock_amount": 10
}
返回数据与公共响应数据一致
method:addProduct
接口调用请求说明:
http请求方式:POST
请求地址:https://waybill.api.jz.fkw.com/api/product/add?access_token=xxx&method=addProduct
参数名称 | 类型 | 必须 | 说明 |
name | string | true | 商品名称。长度限制为100 |
lid | int | true | 商品库。从2.4中获取。如果没特殊要求,可以传1(代表默认产品库) |
introduction | string | false | 卖点描述。长度限制为75 |
img_url_list | string[] | false | 主图的图片链接列表。 即将在2023.6.30废弃,请勿使用 |
media_id_list | string[] | false | 主图的图片id列表。通过4.1进行获取。 |
prop_list | prop[] | false | 商品参数。例子:[{"name":"容积","value":"5L"}, {"name":"重量","value":"5kg"},…] |
desc | string | false | 商品详情。html格式的字符串。 强制:2023.6.30开始,商品详情里面的图片链接使用我来内部的图片链接。(我来内部图片链接通过4.1、4.2进行获取) |
sku_list | sku[] | true | 商品规格列表。无sku商品则只需传入一个sku来记录“价格、库存、产品编码”等数据。 |
group_id_list | int[] | false | 商品分类id。从2.5中获取 |
sku类型:
参数名称 | 类型 | 必须 | 说明 |
price | double | true | sku价格 |
properties_name | prop[] | true | Sku属性名称。如[{"name":"颜色", "value":"白色", "media_id":"id1"},{"name":"尺码", "value":"XXL","media_id":"id2"},...]。商品无sku则传[] |
stock | int | true | sku库存 |
product_code | string | false | 商品编码 |
prop类型:
参数名称 | 类型 | 必须 | 说明 |
name | string | true | 参数名称 |
value | string | true | 参数值 |
media_id | string | false | 规格值对应的图片id。 通过接口4.1获取。相同规格值传入相同id即可,无需重复上传。 可参考2.3.3请求示例 |
{
"name": "方便面",
"lid": 1,
"introduction": "非常美味,买二送一",
"img_url_list": ["https://xxxx", "https://xxxx", "https://xxxx"],
"media_id_list": ["ABUIABAAGAAgoZyylwYoqPW_rgI1", "ABUIABAAGAAgoZyylwYoqPW_rgI2", "ABUIABAAGAAgoZyylwYoqPW_rgI3"],
"prop_list": [{
"name": "容积",
"value": "5L"
}, {
"name": "重量",
"value": "5kg"
}],
"desc": "<p><img src=\"//xxxxx.jpg\"><\/p>",
"sku_list": [{
"price": 25.5,
"properties_name": [{
"name": "颜色",
"value": "白色",
"media_id":"id1"
}, {
"name": "尺码",
"value": "XXL",
"media_id":"id2"
}],
"stock": 998,
"product_code": "ABC-321123"
}, {
"price": 28.5,
"properties_name": [{
"name": "颜色",
"value": "白色",
"media_id":"id1"
}, {
"name": "尺码",
"value": "L",
"media_id":"id3"
}],
"stock": 198,
"product_code": "CBA-123321"
}]
}
返回数据与公共响应数据一致
接口调用请求说明:
http请求方式:GET
请求地址:https://waybill.api.jz.fkw.com/api/product/getProductLibList?access_token=xxx
无
无
参数名称 | 类型 | 说明 |
lib_list | lib_info | 产品库列表 |
lib_info类型:
参数名称 | 类型 | 说明 |
lib_id | int | 产品库id |
name | string | 产品库名称 |
{
"rt":0,
"success":true,
"msg": "查询成功",
"lib_list": [
{
"lib_id": 1,
"name": "库1"
},
{
"lib_id": 2,
"name": "库2"
},
{
"lib_id": 3,
"name": "库3"
}
]
}
接口调用请求说明:
http请求方式:GET 请求地址:https://waybill.api.jz.fkw.com/api/product/getProductGroupList?access_token=xxx
无
无
参数名称 | 类型 | 说明 |
group_list | group_info | 产品分类列表 |
group_info类型:
参数名称 | 类型 | 说明 |
group_id | int | 产品分类id |
name | string | 产品分类名称 |
parent_id | int | 产品分类的上级id。为0则为** |
{
"rt":0,
"success":true,
"msg": "查询成功",
"group_list": [
{
"group_id": 1,
"name": "一级分类",
"parent_id": 0
},
{
"group_id": 2,
"name": "二级分类",
"parent_id": 1
},
{
"group_id": 3,
"name": "三级分类",
"parent_id": 2
},
{
"group_id": 4,
"name": "一级分类2",
"parent_id": 0
},
{
"group_id": 5,
"name": "二级分类2",
"parent_id": 4
}
]
}
method:getOrder
接口调用请求说明:
http请求方式:GET
旧请求地址:https://waybill.api.jz.fkw.com?access_token=xxx&method=getOrder&order_id=1
新请求地址:https://waybill.api.jz.fkw.com/api/order/get?access_token=xxx
&method=getOrder&order_id=1
参数名称 | 类型 | 必须 | 说明 |
order_id | string | true | 订单id |
{
"order_id":"20200101001"
}
Order
参数名称 | 类型 | 说明 |
id | string | 订单id |
shop_id | string | 商户id |
price | double | 订单金额 |
spread | double | 涨减价,正数代表涨价,负数代表减价 |
buyer_acct | string | 买家账号 |
buyer_remarks | string | 买家留言 |
seller_remarks | string | 卖家备注 |
consignee_name | string | 收货人姓名 |
province | string | 收货人省份 |
city | string | 收货人城市 |
district | string | 收货人区\县 |
town | string | 收货人街道 |
street | string | 收货人详情地址 |
telephone | string | 固话 |
mobile | string | 手机 |
settle_time | Date | 下单时间 |
pay_time | Date | 付款时间 |
modified_time | Date | 订单最后修改时间 |
balance_pay_time | Date | 定金预售尾款付款时间 |
ship_price | double | 运费 |
status | string | 订单状态。可选值如下: wait_buyer_pay (未付款 ) wait_seller_ship (待发货) shipped(卖家已发货,待买家确认收货) finished(已完成,卖家确认收货后变成已完成 ) canceled(已取消) |
payment_type | string | 付款类型。可选值如下: online(在线支付) cod(货到付款、代收货款) |
waybill_no | string | 物流单号 |
logistics_name | string | 物流公司名称 |
order_type | string | 订单类型,如普通订单,社区团购订单 |
shipping_type | string | 配送类型,如“快递发货”,“到店自提”,“同城配送”,“无需配送” |
pay_mode | string | 支付方式 |
promoter_name | string | 推广员名称(推广员订单完成时有值) |
promoter_award | double | 推广员奖励(推广员订单完成时有值) |
inviter_name | string | 邀请者名称(推广员订单状态完成时有值) |
invite_award | double | 邀请者奖励(推广员订单状态完成时有值) |
dist_name | string | 分销商名称(分销商订单状态完成时有值) |
dist_award | double | 分销奖励金额(分销商订单状态完成时有值) |
order_items | OrderItem[] | 商品信息 |
OrderItem
参数名称 | 类型 | 说明 |
id | string | 订单项Id(必填) |
title | string | 商品标题(必填) |
weight | Double | 商品总重量(单品重量*数量),单位kg |
product_id | string | 商品ID |
product_code | string | 产品编码 |
sku_properties | string | 商品属性(如颜色:白色;码数:XXL码) |
image_url | string | 图片链接 |
item_original_price | Double | 订单项原价(商品数量 * 商品原价) |
item_discount_price | Double | 订单项实付金额 |
item_discount | Double | 订单项优惠金额 |
quantity | Integer | 数量 |
refund_status | string | 退款状态。可选值如下: null或者空字符串表示没有退款 wait_seller_agree (买家申请退款,等待卖家同意 ) wait_buyer_return_goods (卖家同意退款,等待买家寄回商品 ) wait_seller_confirm_goods(买家已寄回商品,等待卖家确认) seller_refuse_buyer (卖家拒绝退款 ) closed (退款关闭 ) success (退款成功) |
{
"rt":0,
"success":true,
"msg": "查询成功",
"order":{
"id": "20200101001",
"buyer_acct": "test_acct",
"province": "广东省",
"city": "广州市",
"district": "天河区",
......
"order_item_list": [
{
"id": "1",
"title": "测试商品",
"product_id": "33333",
......
}
]
}
}
method:getOrderList
说明:不允许获取三个月前的订单
接口调用请求说明:
http请求方式:GET
旧请求地址:https://waybill.api.jz.fkw.com?access_token=xxx&method=getOrderList
&status=wait_seller_ship&page_size=100&page_no=1&time_type=created&time_from=2021-02-23 16:00:00&time_to=2021-02-30 16:00:00
新请求地址:https://waybill.api.jz.fkw.com/api/order/getList?access_token=xxx
&method=getOrderList&status=wait_seller_ship&page_size=100&page_no=1&time_type=created&time_from=2021-02-23 16:00:00&time_to=2021-02-30 16:00:00
参数名称 | 类型 | 说明 |
status | string | 订单状态。如果没有这个参数或者为空值时,表示获取所有状态的订单,需支持同时查询多个状态,多个状态用英文逗号分开,如wait_buyer_pay,wait_seller_ship。可选值如下: wait_buyer_pay(未付款 ) wait_seller_ship (已付款待发货) shipped(卖家已发货,待买家确认收货) finished (已完成,卖家确认收货后变成已完成 ) canceled (已取消的订单,表示付款前关闭的订单或者发货后退款退货完成的订单或者其他原因取消的订单) |
page_size | int | 每页返回的订单数(**页数为200) |
page_no | int | 页码(从1开始) |
time_type | string | 时间类型。可选值如下: created(创建订单时间) modified(修改订单时间) |
time_from | string | 开启时间字符串,如2021-02-23 16:00:00 |
time_to | string | 结束时间字符串,如2021-02-30 16:00:00 |
{
"status":"wait_buyer_pay",
"page_no":1,
"page_size":100,
"time_type":"created",
"time_from":"2021-02-23 16:00:00",
"time_to":"2021-02-30 16:00:00"
}
参数名称 | 类型 | 说明 |
orders | Order [ ] | 符合搜索条件的当前页订单,Order数据结构请参考get.order接口的响应数据结构 |
total | int | 符合搜索条件的所有订单数量 |
{
"rt":0,
"success":true,
"msg": "查询成功",
"order_list":[
{
"id": "20200101001",
"buyer_acct": "test_acct",
"province": "广东省",
"city": "广州市",
"district": "天河区",
......
"order_item_list": [
{
"id": "1",
"title": "测试商品",
"product_id": "33333",
......
}
]
}
......
],
"total": 10
}
接口调用请求说明:
http请求方式:POST
请求地址:https://waybill.api.jz.fkw.com/api/order/pay?access_token=xxx&order_id=20200101001
参数名称 | 类型 | 说明 |
order_id | string | 订单ID |
{
"order_id":"20200101001"
}
返回内容与公共响应数据一致
method:shipOrder
说明:logistics_code请参照以下的快递100快递公司标准编码的【公司编码】,不能自定义
接口调用请求说明:
http请求方式:POST
旧请求地址:https://waybill.api.jz.fkw.com?access_token=xxx&method=shipOrder
&order_id=20200101001&waybill_no=M2002115671&logistics_code=SHUNFENG&logistics_name=顺丰速运
新请求地址:https://waybill.api.jz.fkw.com/api/order/ship?access_token=xxx&method=shipOrder
&order_id=20200101001&waybill_no=M2002115671&logistics_code=SHUNFENG&logistics_name=顺丰速运
参数名称 | 类型 | 说明 |
order_id | string | 订单ID |
waybill_no | string | 运单号 |
logistics_code | string | 物流公司编码,从execl中获取 |
logistics_name | string | 物流公司名称 |
{
"order_id":"20200101001",
"waybill_no":"M2002115671",
"logistics_code":"shunfeng",
"logistics_name":"顺丰速运"
}
返回内容与公共响应数据一致
说明:logistics_code请参照以下的快递100快递公司标准编码的【公司编码】,不能自定义
接口调用请求说明:
http请求方式:POST
请求地址:https://waybill.api.jz.fkw.com/api/order/complete?access_token=xxx&order_id=20200101001&waybill_no=M2002115671&logistics_code=SHUNFENG&logistics_name=顺丰速运
参数名称 | 类型 | 说明 |
order_id | string | 订单ID |
waybill_no | string | 运单号,当未发货时必填 |
logistics_code | string | 物流公司编码,从execl中获取,当未发货时必填 |
logistics_name | string | 物流公司名称,当未发货时必填 |
{
"order_id":"20200101001",
"waybill_no":"M2002115671",
"logistics_code":"SHUNFENG",
"logistics_name":"顺丰速运"
}
返回内容与公共响应数据一致
接口调用请求说明:
http请求方式:POST
请求地址:https://waybill.api.jz.fkw.com/api/order/cancel?access_token=xxx&order_id=20200101001
参数名称 | 类型 | 说明 |
order_id | string | 订单ID |
{
"order_id":"20200101001"
}
返回内容与公共响应数据一致
接口调用请求说明:
http请求方式:POST 请求地址:https://waybill.api.jz.fkw.com/api/upload/uploadMedia?access_token=xxx
参数名称 | 类型 | 说明 |
out_media_url | string | 图片/视频链接地址 |
无
参数名称 | 类型 | 说明 |
media_id | string | 我来内部图片/视频id |
media_url | string | 我来内部图片/视频url |
{
"rt": 0,
"success": true,
"msg": "上传成功",
"media_id": "ABUIABAAGAAgoZyylwYoqPW_rgI",
"media_url": "https://xxxxxx/x/x/ABUIABAAGAAgoZyylwYoqPW_rgI.png"
}
1、 资源库空间不足会上传失败
2、 上传文件超过限定大小会上传失败
3、接口调用过于频繁会上传失败
接口调用请求说明:
http请求方式:POST/FORM (用FORM表单方式上传一个多媒体文件)
请求地址:https://waybill.api.jz.fkw.com/api/upload/uploadMediaByFile?access_token=xxx
参数名称 | 类型 | 说明 |
media | 文件 | form-data中媒体文件标识,有filename、filelength、content-type等信息 |
无
参数名称 | 类型 | 说明 |
media_id | string | 我来内部图片/视频id |
media_url | string | 我来内部图片/视频url |
{
"rt": 0,
"success": true,
"msg": "上传成功",
"media_id": "ABUIABAAGAAgoZyylwYoqPW_rgI",
"media_url": "https://xxxxxx/x/x/ABUIABAAGAAgoZyylwYoqPW_rgI.png"
}
1、资源库空间不足会上传失败
2、上传文件超过限定大小会上传失败
说明1:如您对接的是小程序,我来商城必须获取到会员微信unionid,用手机号/账号是不行的。因此要求:
(1)您需将我来商城小程序,绑定至您自己的开放平台下-保证同个会员unionid**性 (【操作教程】我来小程序绑定到新开放平台)
(2)您需自行存储好小程序客户的unionid----------------会员新增时需传给我来
说明2:会员接口只负责做数据传输,不涉及任何任何功能实现,因此静默登录/无需二次登录效果是无法实现的。
接口调用请求说明:
http请求方式:GET
请求地址:https://waybill.api.jz.fkw.com/api/member/getList?access_token=xxx
参数名称 | 类型 | 说明 |
page_size | int | 每页返回的会员数(**页数为200) |
page_no | int | 页码(从1开始) |
{
"page_no":1,
"page_size":100
}
参数名称 | 类型 | 说明 |
wxAppUnionId | string | 会员unionid |
id | int | 会员id |
acct | string | 会员账号 |
name | string | 会员名称 |
mobile | string | 会员手机号 |
string | 邮箱 | |
level | int | 会员等级id(0→9,分别对应VIP1→VIP10) |
currentIgt | int | 当前积分 |
totalIgt | int | 累计积分 |
prop_list | array | 自定义参数,非必填,例子:[{"name":"地区","value":"广州"}, {"name":"商户名","value":"小超市"},…] |
{
"rt": 0,
"success": true,
"msg": "查询成功",
"member_list":[
{
"id": "1",
"acct": "acct1",
"name": "会员1",
"mobile": "13800138000",
"email": "123@qq.com",
"level": 0,
"wxAppUnionId":"xxxxxxxxx",
"currentIgt":10,
"totalIgt":20,
"propList":{"name":"地区","value":"广州"},{"name":"面积","value":"小超市"}
},
{
"id": "2",
"acct": "acct2",
"name": "会员2",
"mobile": "13800138001",
"email": "1234@qq.com",
"level": 2,
"wxAppUnionId":"xxxxxxxxx",
"currentIgt":10,
"totalIgt":20,
"propList":{"name":"地区","value":"广州"},{"name":"面积","value":"小超市"}
}
......
],
"total": 20
}
接口调用请求说明:
http请求方式:GET
请求地址:https://waybill.api.jz.fkw.com/api/member/get?access_token=xxx&id=1
参数名称 | 类型 | 说明 |
id | int | 会员id,必填项 |
{
"id":1
}
参数名称 | 类型 | 说明 |
acct | string | 会员账号 |
name | string | 会员名称 |
mobile | string | 会员手机号 |
string | 邮箱 | |
level | int | 会员等级id(0→9,分别对应VIP1→VIP10) |
currentIgt | int | 当前积分 |
totalIgt | int | 累计积分 |
prop_list | array | 自定义参数,非必填,例子:[{"name":"地区","value":"广州"}, {"name":"商户名","value":"小超市"},…] |
{
"rt": 0,
"success": true,
"msg": "查询成功",
"member":{
"acct": "acct1",
"name": "会员1",
"mobile": "13800138000",
"email": "123@qq.com",
"level": "黄金会员",
"currentIgt":10,
"totalIgt":20,
"propList":{"name":"地区","value":"广州"},{"name":"面积","value":"小超市"}
}
}
接口调用请求说明:
http请求方式:POST
请求地址:https://waybill.api.jz.fkw.com/api/member/add?access_token=xxx
参数名称 | 类型 | 说明 |
acct | string | 会员账号,会员打通**标识,必填项,支持英文字母(大小写)、数字和_ 字符;**长度为50; |
pwd | string | 会员密码,必填项,包含至少数字、大写字母、小写字母、特殊字符两种以上的组合,长度为8-20; |
name | string | 会员名称,必填项,**长度为50; |
mobile | string | 会员手机号,非必填项,长度限制11位; |
string | 会员邮箱,非必填项 | |
level | int | 会员等级,非必填项,如果值匹配不上后台等级,默认给最低等级; |
union_id | string | 会员unionid,非必填项 |
prop_list | prop[] | 自定义参数,非必填,例子:[{"name":"地区","value":"广州"}, {"name":"商户名","value":"小超市"},…] |
*注意:传参时必须确保对应参数,在我来商城后台已开启【注册时启用】,否则无法传入。
{
"acct":"test1",
"pwd":"abc123456",
"name":"测试1",
"mobile":"13800138000",
"email":"123@qq.com",
"level":1,
"union_id":"xxxxxxxx",
"prop_list":[{"name":"地区","value":"广州"}, {"name":"商户名","value":"小超市"}]
}
参数名称 | 类型 | 说明 |
id | int | 添加会员成功后返回的会员id |
msg | string | 新增成功or新增失败(具体原因:必填字段“xxxx、xxxx”为空) |
成功
{
"rt": 0,
"success": true,
"msg": "新增成功",
"id":1
}
失败
{
"rt": -2,
"success": false,
"msg": "密码格式错误"
}
接口调用请求说明:
http请求方式:POST
请求地址:https://waybill.api.jz.fkw.com/api/member/setIgt?access_token=xxx&id=1
参数名称 | 类型 | 说明 |
id | int | 会员id,必填项 |
operate | int | 积分操作,必填项,0为增加,1为扣减 |
alter_num | int | 需要操作的积分,必填项,为大于0的正数 |
detail | string | 积分增减备注(会在C端展示,请谨慎填写) 非必填项,不填在C端默认展示为“商家赠送积分”or"商家扣除积分”,最多200字符。 |
{
"id":1,
"operate":0,
"alter_num":5,
"detail":"主动增加5积分"
}
参数名称 | 类型 | 说明 |
msg | string | 商家赠送积分成功or商家扣除积分(会展示具体原因) |
{
"rt": 0,
"success": true,
"msg": "商家赠送积分成功"
}
Q:新旧请求路径如何选择?
选择新请求地址,旧请求不再维护,计划后续会逐步废掉;
Q:请求报错,参数【xxx】为必填项
当前接口参数为【请求参数】传参,非【json】格式传参。如换取token请求为
https://waybill.api.jz.fkw.com/api/oauth/getAccessToken?client_id=xxx&client_secret=xxx&grant_type=authorization_code&code=xxx
Q:access_token过期时间为2个小时,那是不是每2个小时客户就得授权一次?
不是!!!access_token过期可以通过refresh_token调用【刷新token】接口换取新的access_token,refresh_token的过期时间为28天,客户每隔28天授权一次即可。