nearbyPoi.getList
This interface should be called on the server side, as
detailed in the Service Side API.
This interface
supports cloud calls.
Developer tool version required . . . 1.02.1904090
(latest stable download)
wx-server-sdk >= 0.4.0
View a list of places
How to call:
HTTPS call
The request address
GET https://api.weixin.qq.com/wxa/getnearbypoilist?page=1&page_rows=20&access_token=ACCESS_TOKEN
Request parameters
Property
|
Type
|
The default
|
Required
|
Description
|
access_token
|
string
|
|
Is
|
The interface calls the credentials
|
page
|
number
|
|
Is
|
Start page id (count from 1)
|
page_rows
|
number
|
|
Is
|
Number of impressions per page (up to 1000)
|
Returns a value
Object
Property
|
Type
|
Description
|
errmsg
|
string
|
The error message
|
errcode
|
number
|
Error code
|
data
|
object
|
Returns data
|
The structure of the data
Property
|
Type
|
Description
|
left_apply_num
|
number
|
The number of places remaining to add
|
max_apply_num
|
number
|
The maximum number of places that can be added
|
data
|
string
|
The JSON format string for the
address list
|
The structure of data.data
Property
|
Type
|
Description
|
poi_list
|
Array.<Object>
|
The address list
|
data.data.poi_list structure of the system
Property
|
Type
|
Description
|
poi_id
|
string
|
Nearby location ID
|
qualification_address
|
string
|
Qualification document address
|
qualification_num
|
string
|
Qualification document number
|
audit_status
|
number
|
Location audit status
|
display_status
|
number
|
The location is displayed in a nearby state
|
refuse_reason
|
string
|
Reason for audit failure,
audit_status=4
|
audit_status legal value of the list
Value
|
Description
|
The lowest version
|
3
|
under review
|
|
4
|
Audit failure
|
|
5
|
examination passed
|
|
display_status legal value of the data
Value
|
Description
|
The lowest version
|
0
|
Not shown
|
|
1
|
On display
|
|
Error
Error code
|
The error message
|
Description
|
0
|
Ok
|
Normal
|
47001
|
|
POST data json is in the wrong format
|
20002
|
|
The POST parameter is illegal
|
44002
|
|
POST data is empty
|
92000
|
|
This business qualification has been added, do not add it repeatedly
|
92002
|
|
The number of nearby places added reaches the online level and cannot continue to be added
|
92003
|
|
The location is already occupied by other small programs
|
92004
|
|
Nearby functions are blocked
|
92005
|
|
The location is under review
|
92006
|
|
The location is showing the small program
|
92007
|
|
Location audit failed
|
92008
|
|
The program is not shown at that location
|
93009
|
|
The small program is not on the shelf or is not visible
|
93010
|
|
The location does not exist
|
93011
|
|
Personal type gadgets are not available
|
93011
|
|
Personal type gadgets are not available
|
93012
|
|
Non-ordinary types of small programs (store programs, small store programs, etc.) are not available
|
93013
|
|
Getting address details from Tencent Maps failed
|
93014
|
|
The same qualification number is added repeatedly
|
Return an example of the data
{
"errcode": 0,
"errmsg": "",
"data": {
"left_apply_num": 9,
"max_apply_num": 10,
"data": "{\"poi_list\": [{\"poi_id\": \"123456\",\"qualification_address\": \"广东省广州市海珠区新港中路123号\",\"qualification_num\": \"123456789-1\",\"audit_status\": 3,\"display_status\": 0,\"refuse_reason\": \"\"}]}"
}
}
Cloud calls
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.
The interface method
openapi.nearbyPoi.getList
Permissions for the nearbyPoi.getList API need to be configured in config.json,
details
Request parameters
Property
|
Type
|
The default
|
Required
|
Description
|
page
|
number
|
|
Is
|
Start page id (count from 1)
|
pageRows
|
number
|
|
Is
|
Number of impressions per page (up to 1000)
|
Returns a value
Object
Property
|
Type
|
Description
|
errMsg
|
string
|
The error message
|
errCode
|
number
|
Error code
|
data
|
object
|
Returns data
|
The structure of the data
Property
|
Type
|
Description
|
leftApplyNum
|
number
|
The number of places remaining to add
|
maxApplyNum
|
number
|
The maximum number of places that can be added
|
data
|
string
|
The JSON format string for the
address list
|
The structure of data.data
Property
|
Type
|
Description
|
poiList
|
Array.<Object>
|
The address list
|
The structure of data.data.poiList
Property
|
Type
|
Description
|
poiId
|
string
|
Nearby location ID
|
qualificationAddress
|
string
|
Qualification document address
|
qualificationNum
|
string
|
Qualification document number
|
auditStatus
|
number
|
Location audit status
|
displayStatus
|
number
|
The location is displayed in a nearby state
|
refuseReason
|
string
|
Reason for audit failure,
audit_status=4
|
The legal value of auditStatus
Value
|
Description
|
The lowest version
|
3
|
Under review
|
|
4
|
The audit failed
|
|
5
|
The audit is approved
|
|
The legal value of displayStatus
Value
|
Description
|
The lowest version
|
0
|
Not shown
|
|
1
|
On display
|
|
Abnormal
Object
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
|
Error
Error code
|
The error message
|
Description
|
0
|
Ok
|
Normal
|
47001
|
|
POST data json is in the wrong format
|
20002
|
|
The POST parameter is illegal
|
44002
|
|
POST data is empty
|
92000
|
|
This business qualification has been added, do not add it repeatedly
|
92002
|
|
The number of nearby places added reaches the online level and cannot continue to be added
|
92003
|
|
The location is already occupied by other small programs
|
92004
|
|
Nearby functions are blocked
|
92005
|
|
The location is under review
|
92006
|
|
The location is showing the small program
|
92007
|
|
Location audit failed
|
92008
|
|
The program is not shown at that location
|
93009
|
|
The small program is not on the shelf or is not visible
|
93010
|
|
The location does not exist
|
93011
|
|
Personal type gadgets are not available
|
93011
|
|
Personal type gadgets are not available
|
93012
|
|
Non-ordinary types of small programs (store programs, small store programs, etc.) are not available
|
93013
|
|
Getting address details from Tencent Maps failed
|
93014
|
|
The same qualification number is added repeatedly
|
An example of a request
const cloud = require('wx-server-sdk')
cloud.init()
exports.main = async (event, context) => {
try {
const result = await cloud.openapi.nearbyPoi.getList({
page: '',
pageRows: ''
})
return result
} catch (err) {
return err
}
}
Return an example of the data
{
"errCode": 0,
"errMsg": "openapi.nearbyPoi.getList:ok",
"data": {
"data": "{\"poi_list\": [{\"poi_id\": \"123456\",\"qualification_address\": \"广东省广州市海珠区新港中路123号\",\"qualification_num\": \"123456789-1\",\"audit_status\": 3,\"display_status\": 0,\"refuse_reason\": \"\"}]}",
"leftApplyNum": 9,
"maxApplyNum": 10
}
}