1)由平台提供,开发者可查询某商品的信息
2)URL地址:https://public.zjuhe.cn/api/goods_query
3)请求参数
变量名 | 必填 | 类型 | 说明 |
code | 是 | String(128) | 专属编码(例:Zj20190924125636),平台方提供开发者访问的标识码 |
APPID | 是 | String(128) | 公众号ID(例:wx68727as88872t97),微信公众号专属标识 |
merchant | 是 | String(128) | 商户名(例:智聚合) |
goods_name | 否 | String(128) | 商品名称(例:雪碧) |
goods_id | 否 | Int(10) | 商品id(例:1188) |
4)举例如下:
$date=[
'code' =>'Zj20190924125636',
'APPID' =>'wx68727as88872t97',
'goods_name' =>'雪碧',
'goods_id' =>1188,
'merchant' =>'智聚合',
];
$result = get_http_content('https://public.zjuhe.cn/api/goods_query', 'POST',$date);
5)返回结果
变量名 | 必填 | 类型 | 示例值 | |
code | 是 | String(128) | 专属编码(例:Zj20190924125636),平台方提供开发者访问的标识码 | |
id | 是 | Int(10) | 商品ID | |
goods_describe | 是 | String(128) | 商品描述 | |
goods_name | 是 | String(128) | 商品名称 | |
price | 是 | Float(10) | 售价 | |
reward_integral | 是 | Int(10) | 奖励积分 | |
integral_exchange | 是 | Int(10) | 积分兑换 | |
merchant | 是 | String(128) | 商户名 | |
commongoods_id | 是 | Int(10) | 关联公共商品的ID | |
goods_pic | 是 | String(128) | 商品图片地址 |
示例:
{"code":200,"msg":"查询成功","data":[{"id":1188,"sn":"nwxv1012","goods_pic":"https:\/\/selfsale.zjuhe.cn\/uploads\/20190211\/2bd07af40f06006839d9f3b2dcb4ca9d.jpg","goods_describe":"测试商品","goods_name":"雪碧","price":"0.01","create_time":1549852948,"update_time":1563271987,"reward_integral":0,"integral_exchange":0,"merchant":"智聚合","commongoods_id":90151,"appointment_time":null,"appointment_num":null,"discount":null,"code":"Zj20190924125636"}]}