May 19, 2021 WeChat Mini Program Development Document
This interface should be called on the server side, as detailed in the Service Side API.
This interface supports cloud calls. D eveloper tool version required . . . 1.02.1904090 (latest stable download)
wx-server-sdk >= 0.4.0
Add a place
How to call:
POST https://api.weixin.qq.com/wxa/addnearbypoi?access_token=ACCESS_TOKEN
Property | Type | The default | Required | Description |
---|---|---|---|---|
access_token | string | Is | The interface calls the credentials | |
is_comm_nearby | string | Is | Required, write dead as "1" | |
pic_list | string | Is | Store pictures, up to 9, at least 1, upload store images such as store exterior, environmental facilities, merchandise services, etc., pictures will be displayed on the WeChat client's store page. T he image link is obtained https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1444738729 the "Upload images within the image message" interface in the document's website. Required, the file format is bmp, png, jpeg, jpg, or gif, no more than 5M pic_list is a string, the content is a json | |
service_infos | string | Is |
The list of mandatory service labels is required and needs to be filled in
1, service label ID 2, service type tpye 3, service name name name See service label id number, type and service name table below for detailed field format 4、 APPID 5, the corresponding service landing page path: path path page to be consistent with the corresponding service label, such as choose takeaway service, path path should be the takeaway corresponding page of the small program, path path to get consulting development or to the small program management background - tools - generate small program code page to get 6, the new service description desc: describe the service content, such as full reduction, discount and other preferential information or new products, explosives and other commodity information, only standard services can be added, within 10 characters. service_infos is a string and the content is a johnson |
|
kf_info | string | Is | Customer service information optional, customizable service avatar and nickname, the specific fill-in field can be found in the following example kf_info pic_list is a string, the content is a johnson | |
store_name | string | Is | Store name required, store name according to the selected geographical location to automatically pull Tencent Map store name, can not be modified, if you need to modify please reproduce the select map location or re-create the location. | |
hour | string | Is | Hours, format 11:11-12:12 required | |
address | string | Is | Address required | |
poi_id | string | Is | If you create a new store, poi_id field is empty If the store is updated, poi_id parameters fill in the options for the corresponding store poi_id the option | |
company_name | string | Is | Subject name is required | |
contract_phone | string | Is | Store phone required | |
credential | string | Is | Qualification number required, 15 business license registration number or 9 organization code | |
qualification_list | string | Is | Proof materials Required If company_name and the subject of the small program do not agree, need to fill in qualification_list, detailed rules see the nearby small program use guide - how to prove that the store's operating entity and the public number or small program account subject related http://kf.qq.com/faq/170401MbUnim17040122m2qY.html | |
map_poi_id | string | Is |
Corresponding to the sosomap_poi_uid field in "Search for Stores in Tencent Map" Tencent map there are some data insignity, if you do not fill map_poi_id, the small probability will fail to submit!
Note: poi_id relationship map_poi_id the world: map_poi_id is the unique logo of Tencent Maps for poi poi_id is the only sign of the store after it is moved into the vicinity |
|
NearbyPoiError@error |
The returned JSON packet
Property | Type | Description |
---|---|---|
errmsg | string | The error message |
errcode | number | Error code |
data | object | Returns data |
The structure of the data
Property | Type | Description |
---|---|---|
audit_id | string | The approval document ID |
poi_id | string | Nearby location ID |
related_credential | string | Business qualification document number |
Note: Adding stores requires review and takes 1 to 2 business days
Id | type | name (service name) |
---|---|---|
0 | 2 | Custom service, customizable name (less than 10) |
1 | 1 | Delivery |
2 | 1 | Express |
3 | 1 | Charging |
4 | 1 | Appointment |
5 | 1 | Registered |
6 | 1 | Order |
7 | 1 | Preferential |
8 | 1 | Ride |
9 | 1 | Member |
10 | 1 | Pay |
11 | 1 | Queuing |
12 | 1 | Payment |
13 | 1 | Buy tickets |
14 | 1 | Come to the shop and bring it up |
15 | 1 | Scheduled |
Add requests do not support consupportion calls at this time, and serial calls are recommended at intervals of 1s
{
"is_comm_nearby": "1", //值固定
"kf_info": "{\"open_kf\":true,\"kf_headimg\":\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITqmP914zSwhajIEJzUPpx40P7R8fRe1QmicneQMhFzpZNhSLjrvU1pIA/0?wx_fmt=jpeg\",\"kf_name\":\"Harden\"}",
"pic_list": "{\"list\":[\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITqmP914zSwhajIEJzUPpx40P7R8fRe1QmicneQMhFzpZNhSLjrvU1pIA/0?wx_fmt=jpeg\",\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITRneE5FS9uYruXGMmrtmhsBySwddEWUGOibG8Ze2NT5E3Dyt79I0htNg/0?wx_fmt=jpeg\"]}",
"service_infos": "{\"service_infos\":[{\"id\":2,\"type\":1,\"name\":\"快递\",\"appid\":\"wx1373169e494e0c39\",\"path\":\"index\"},{\"id\":0,\"type\":2,\"name\":\"自定义\",\"appid\":\"wx1373169e494e0c39\",\"path\":\"index\"}]}",
"store_name": "羊村小马烧烤",
"contract_phone": "111111111",
"hour": "00:00-11:11",
"company_name": "深圳市腾讯计算机系统有限公司",
"credential": "156718193518281",
"address": "新疆维吾尔自治区克拉玛依市克拉玛依区碧水路15-1-8号(碧水云天广场)",
"qualification_list": "3LaLzqiTrQcD20DlX_o-OV1-nlYMu7sdVAL7SV2PrxVyjZFZZmB3O6LPGaYXlZWq",
"poi_id": ""
}
Returns the json example: "errcode":0, "errmsg": "ok", "data": "audit_id":416620525, "poi_id": 112333
The audit status is pushed through the event notification, and the push data format is XML
<xml>
<ToUserName><![CDATA[gh_4346ac1514d8]]></ToUserName>
<FromUserName><![CDATA[od1P50M-fNQI5Gcq-trm4a7apsU8]]></FromUserName>
<CreateTime>1488856741</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[add_nearby_poi_audit_info]]></Event>
<audit_id>11111</audit_id>
<status>3</status> // 2: 审核失败 3: 审核通过
<reason><![CDATA[xxx]]></reason> //审核失败的理由
<poi_id>111111</poi_id>
</xml>
Parameters | Description |
---|---|
audit_id | Audit document id |
status | Audit Status (3: Audit Passed, 2: Audit Failed) |
reason | If the status is 2, the reason for the audit failure is returned |
poi_id | poi_id |
Cloud call is the ability provided by the small program Cloud Development to call WeChat open interfaces in cloud functions and need to be used in cloud functions via wx-server-sdk.
openapi.nearbyPoi.add
The permissions for the nearbyPoi.add API need to be configured in config.json, details
Property | Type | The default | Required | Description |
---|---|---|---|---|
isCommNearby | string | Is | Required, write dead as "1" | |
picList | string | Is | Store pictures, up to 9, at least 1, upload store images such as store exterior, environmental facilities, merchandise services, etc., pictures will be displayed on the WeChat client's store page. T he image link is obtained https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1444738729 the "Upload images within the image message" interface in the document's website. Required, the file format is bmp, png, jpeg, jpg, or gif, no more than 5M pic_list is a string, the content is a json | |
serviceInfos | string | Is |
The list of mandatory service labels is required and needs to be filled in
1, service label ID 2, service type tpye 3, service name name name See service label id number, type and service name table below for detailed field format 4、 APPID 5, the corresponding service landing page path: path path page to be consistent with the corresponding service label, such as choose takeaway service, path path should be the takeaway corresponding page of the small program, path path to get consulting development or to the small program management background - tools - generate small program code page to get 6, the new service description desc: describe the service content, such as full reduction, discount and other preferential information or new products, explosives and other commodity information, only standard services can be added, within 10 characters. service_infos is a string and the content is a johnson |
|
kfInfo | string | Is | Customer service information optional, customizable service avatar and nickname, the specific fill-in field can be found in the following example kf_info pic_list is a string, the content is a johnson | |
storeName | string | Is | Store name required, store name according to the selected geographical location to automatically pull Tencent Map store name, can not be modified, if you need to modify please reproduce the select map location or re-create the location. | |
hour | string | Is | Hours, format 11:11-12:12 required | |
address | string | Is | Address required | |
poiId | string | Is | If you create a new store, poi_id field is empty If the store is updated, poi_id parameters fill in the options for the corresponding store poi_id the option | |
companyName | string | Is | Subject name is required | |
contractPhone | string | Is | Store phone required | |
credential | string | Is | Qualification number required, 15 business license registration number or 9 organization code | |
qualificationList | string | Is | Proof materials Required If company_name and the subject of the small program do not agree, need to fill in qualification_list, detailed rules see the nearby small program use guide - how to prove that the store's operating entity and the public number or small program account subject related http://kf.qq.com/faq/170401MbUnim17040122m2qY.html | |
mapPoiId | string | Is |
Corresponding to the sosomap_poi_uid field in "Search for Stores in Tencent Map" Tencent map there are some data insignity, if you do not fill map_poi_id, the small probability will fail to submit!
Note: poi_id relationship map_poi_id the world: map_poi_id is the unique logo of Tencent Maps for poi poi_id is the only sign of the store after it is moved into the vicinity |
|
NearbyPoiError@error |
The returned JSON packet
Property | Type | Description |
---|---|---|
errMsg | string | The error message |
errCode | number | Error code |
data | object | Returns data |
The structure of the data
Property | Type | Description |
---|---|---|
auditId | string | The approval document ID |
poiId | string | Nearby location ID |
relatedCredential | string | Business qualification document number |
The exception thrown
Property | Type | Description |
---|---|---|
errMsg | string | The error message |
errCode | number | Error code |
The legal value of errCode
Value | Description | The lowest version |
---|
{
"is_comm_nearby": "1", //值固定
"kf_info": "{\"open_kf\":true,\"kf_headimg\":\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITqmP914zSwhajIEJzUPpx40P7R8fRe1QmicneQMhFzpZNhSLjrvU1pIA/0?wx_fmt=jpeg\",\"kf_name\":\"Harden\"}",
"pic_list": "{\"list\":[\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITqmP914zSwhajIEJzUPpx40P7R8fRe1QmicneQMhFzpZNhSLjrvU1pIA/0?wx_fmt=jpeg\",\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITRneE5FS9uYruXGMmrtmhsBySwddEWUGOibG8Ze2NT5E3Dyt79I0htNg/0?wx_fmt=jpeg\"]}",
"service_infos": "{\"service_infos\":[{\"id\":2,\"type\":1,\"name\":\"快递\",\"appid\":\"wx1373169e494e0c39\",\"path\":\"index\"},{\"id\":0,\"type\":2,\"name\":\"自定义\",\"appid\":\"wx1373169e494e0c39\",\"path\":\"index\"}]}",
"store_name": "羊村小马烧烤",
"contract_phone": "111111111",
"hour": "00:00-11:11",
"company_name": "深圳市腾讯计算机系统有限公司",
"credential": "156718193518281",
"address": "新疆维吾尔自治区克拉玛依市克拉玛依区碧水路15-1-8号(碧水云天广场)",
"qualification_list": "3LaLzqiTrQcD20DlX_o-OV1-nlYMu7sdVAL7SV2PrxVyjZFZZmB3O6LPGaYXlZWq",
"poi_id": ""
}
Returns the json example: "errcode":0, "errmsg": "ok", "data": "audit_id":416620525, "poi_id": 112333