1)由平台提供,开发者可查询库存信息
2)URL地址:https://public.zjuhe.cn/api/stock_inquiry
3)请求参数
变量名 | 必填 | 类型 | 说明 |
code | 是 | String(128) | 专属编码(例:Zj20190924125636),平台方提供开发者访问的标识码 |
APPID | 是 | String(128) | 公众号ID(例:wx68727as88872t97),微信公众号专属标识 |
page | 是 | Int(10) | 返回数据分页页码(例:1,即前1到15的订单数据) |
merchant | 是 | String(128) | 商户名 |
terminal_id | 否 | String(15) | 设备ID(例:869270048847410) |
region_name | 否 | String(128) | 场地名称(例:富力盈力) |
goods_name | 否 | String(128) | 商品名称(例:雪碧) |
aisle_number | 否 | Int(10) | 货道编号(例:10) |
4)举例如下:
$ date =[
‘code’ => ‘Zj20190924125636’,
‘APPID’ => ‘wx68727as88872t97’,
‘page’ => 1,
‘merchant’ =>'智聚合',
‘terminal_id’ => ‘869270048847410’,
‘region_name’ => ‘富力盈力’,
‘goods_name‘=>’雪碧’,
‘aisle_number‘=>10
];
$result = get_http_content(' https://public.zjuhe.cn/api/ stock_inquiry, 'POST',$date);
5)返回结果
变量名 | 必填 | 类型 | 示例值 | |
code | 是 | String(128) | 专属编码(例:Zj20190924125636),平台方提供开发者访问的标识码 | |
region_name | 是 | String(128) | 场地名称(例:富力盈力) | |
terminal_id | 是 | String(15) | 设备ID(例:869270048847410) | |
aisle_number | 是 | Int(10) | 货道编号(例:10) | |
goods_id | 是 | Int(10) | 商品id(例:1188) | |
goods_name | 是 | String(128) | 商品名称(例:雪碧) | |
replenishment_time | 是 | Int(10) | 最近补货时间(例:1573013337) | |
replenishment_after_number | 是 | Int(10) | 最近补货后得储货量(例:10) | |
maxstorage | 是 | Int(10) | 最大储货量(例:12) | |
surplus | 是 | Int(10) | 剩余储货量(例:8) | |
state | 是 | Int(2) | 货道状态(0:正常, 1:废弃) |
示例:
{"code":200,"msg":"查询成功","data":[{"region_name":"富力盈力","terminal_id":"869270048847410","aisle_number":10,"goods_id":1520,"goods_name":"雪碧","replenishment_time":1584696507,"replenishment_after_number":4,"surplus":4,"state":0,"maxstorage":4,"code":"Zj20190924125636"},{"region_name":"富力盈力","terminal_id":"869270048847410","aisle_number":10,"goods_id":1520,"goods_name":"雪碧","replenishment_time":1584103350,"replenishment_after_number":4,"surplus":4,"state":0,"maxstorage":4,"code":"Zj20190924125636"}]}