企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 1、获取商家列表 ~~~ token字段说明md5(companyid + key + 日期) 32位小写 companyid:公司编号 示例10000 key:秘钥:createcarts123456 日期格式:年月日 示例 :20211216 token示例:md5(10000createcarts12345620211216) ~~~ ~~~[api] post: https://dc.bilalipay.com/createcarts/servers/api/getShop *int:companyid#商户编号 *token#token校验 <<< success { "code": 200, "msg": "success", "data": [ { "shopname": "66", "sid": "1", "create_time": "2021-12-09 15:35:36", "companyid": "10000", "describe": "11", "limitshopid": "", "price": "5.00", "unit": "瓶" }, { "shopname": "1", "sid": "2", "create_time": "2021-12-09 15:56:46", "companyid": "10000", "describe": "1", "limitshopid": "", "price": "1.00", "unit": "111" } ] } <<< error { "code": 300, "msg": "token校验失败" } ~~~ ## 返回字段描述 |code | 状态 200 代表成功 | number | | --- | --- | --- | --- | |msg| 提示信息 | string | |data|[] | 数组,code为200时返回| |shopname| 商品名称 | string | |sid| 商品编号 | number | |create_time| 创建时间 | string | |companyid| 商户编号 | number | |describe | 商品描述 | string | |limitshopid | 受限门店 | string | |price | 价格 | number| |unit | 单位 | string| ## 2、创建卡券 ~~~[api] post: https://dc.bilalipay.com/createcarts/servers/api/sendCarts *int:companyid#商户编号 *token#token校验 *sid#商品编号 *orderid#单号 num#发券数量 <<< success { "code": 200, "msg": "卡券创建成功", "data": [ { "codes": "875585743749361321", "num": 1 } ] } <<< error { "code": 300, "msg": "token校验失败" } ~~~ ## 返回字段描述 |code | 状态 200 代表成功 | number | | --- | --- | --- | --- | |msg| 提示信息 | string | |data|[] | 数组,code为200时返回| |codes|券码 | string | |num| 数量序号 | number | ## 3、查询卡券 ~~~[api] post: https://dc.bilalipay.com/createcarts/servers/api/querycarts *int:companyid#商户编号 *token#token校验 *codes#券码 <<< success { "code": 200, "msg": "success", "data": [ { "id": "3", "sid": "1", "cartname": "66", "codes": "942592204219361482", "last_time": "0000-00-00 00:00:00" } ] } <<< error { "code": 300, "msg": "token校验失败" } ~~~ ## 返回字段描述 |code | 状态 200 代表成功 | number | | --- | --- | --- | --- | |msg| 提示信息 | string | |data|[] | 数组,code为200时返回| |codes|券码 | string | |id| 卡券序号 | number | |sid| 商品编号 | number | |cartname| 卡券名称 | string| |last_time| 卡券有效期| string| ## 4、核销卡券 ~~~[api] post: https://dc.bilalipay.com/createcarts/servers/api/destorycarts *int:companyid#商户编号 *token#token校验 *id#券编号多个用逗号隔开示例:4,5 <<< success { "code": 200, "msg": "核销成功", "data": [ { "status": 2, "storename": "", "user": "", "update_time": "2021-12-14 17:42:26", "id": "4" }, { "status": 2, "storename": "", "user": "", "update_time": "2021-12-14 17:42:26", "id": "5" } ] } <<< error { "code": 300, "msg": "token校验失败" } ~~~ ## 返回字段描述 |code | 状态 200 代表成功 | number | | --- | --- | --- | --- | |msg| 提示信息 | string | |data|[] | 数组,code为200时返回| |status|状态2表示已核销 | number | |storename| 核销门店 | string | |user| 核销人 | string | |update_time| 核销时间 | string| |id| 卡券编号| number|