最近有用户在调用淘宝联盟私域渠道备案API时,发现接口返回提示“省(province)为空”或“市city为空”等信息。
如下返回值:
stdClass Object
(
[code] => 15
[msg] => Remote service error
[sub_code] => 1
[sub_msg] => 省(province)为空
[request_id] => 5oclsng8duau
)
【解决方法】
这个是因为你的邀请码链接是使用了“线下门店”或“线下个人”,如下图,
这样的备案链接生成的邀请码,用于调用私域渠道API时,就会要求提供register_info参数,该参数值格式如下:
{"phoneNumber":"18801088599","city":"江苏省","province":"南京市","location":"玄武区花园小区","detailAddress":"5号楼3单元101室","shopType":"社区店","shopName":"全家便利店","shopCertifyType":"营业执照","certifyNumber":"111100299001"}
官方对此字段的说明是:
线下备案注册信息,字段包含:
电话号码(phoneNumber,必填),
省(province,必填),市(city,必填),
区县街道(location,必填),
详细地址(detailAddress,必填),
经营类型(career,线下个人必填),
店铺类型(shopType,线下店铺必填),
店铺名称(shopName,线下店铺必填),
店铺证书类型(shopCertifyType,线下店铺选填),
店铺证书编号(certifyNumber,线下店铺选填)