WeChat device ID
Apply for device ID
Interface Description
Apply for the UUID, Major, and Minor required to configure the device. After the application is successful, the batch ID is returned. The returned batch ID can be used to query the review status of the current application through the "Query Device ID Application Status" interface.
If the number of device IDs applied for in a single application is less than 500, the system will conduct a quick review; if the number of device IDs applied for in a single application is greater than 500, it will be reviewed within three working days. Complete review.
If it is approved, the returned batch ID can be used to pull the device ID of this application through the "Query Device List" interface. To apply for a device ID through the interface, you need to configure the page first. If the page is not configured, the page information will not be displayed.
A public account can apply for up to 100,000 device IDs. If the number of device IDs you want to apply for exceeds the maximum limit, please email zhoubian@tencent.com with the following email format:
标题:申请提升设备ID额度 内容: 1、公众账号名称及appid(wx开头的字符串,在mp平台可查看) 2、用途 3、预估需要多少设备ID
Interface call description
http请求方式: POST(请使用https协议)https://api.weixin.qq.com/shakearound/device/applyid?access_token=ACCESS_TOKENPOST数据格式:json POST数据例子: { "quantity":3, "apply_reason":"测试", "comment":"测试专用", "poi_id":1234 }
Parameter description
Parameter | Is it required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
access_token | is the | calling interface credential | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
quantity | is the number of device IDs applied for by | . If more than 500 new devices are added at a time, Manual review process is required | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
apply_reason | is | application Reason, no more than 100 Chinese characters or 200 English letters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
##comment | No | Remarks, no more than 15 Chinese characters or 30 English letters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
poi_id | No | Device associated Store ID, after associating the store, there will be an opportunity to give priority to information within 1KM of the store. For specific store-related information, you canView the store-related interface documents |
Parameters | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
##audit_status | Approval Status. 0: failed to pass the review, 1: under review, 2: passed the review; if the number of device IDs applied for in a single application is less than or equal to 500, the system will conduct a quick review; if the number of device IDs applied for in a single application is greater than 500, it will be reviewed in The review will be completed within three working days; at this time the return values are all 1 (under review) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
audit_comment | Review remarks, a text description of the review status | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
apply_id | The batch ID of the application can be used in "Query The "Device List" interface queries the device IDs of successful applications in batches. |
Parameter | Is it required | Description |
---|---|---|
access_token | is the | calling interface credential |
apply_id | is the | batch ID, the batch ID returned when applying for a device ID |
Return instructions
Normal return JSON data packet example:
{ "data": { "apply_time": 1432026025, "audit_comment": "test", "audit_status": 1, "audit_time": 0 }, "errcode": 0, "errmsg": "success." }
Parameter Description
Parameter | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
##apply_time | Time stamp of submitted application | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Audit status. 0: failed to pass the review, 1: under review, 2: passed the review; if the number of device IDs applied for in a single application is less than or equal to 500, the system will conduct a quick review; if the number of device IDs applied for in a single application is greater than 500, it will be reviewed in Complete the review within three working days; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Audit notes, text description of the review status | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Determine the timestamp of the audit result. If the status is under audit, the time value is 0 |
Parameter | Is it required | Description |
---|---|---|
access_token | is the | calling interface credential |
device_identifier | is the device ID | specified by |
##device_id | is | Device number. If UUID, major, and minor are filled in, the device number is not required. If both are filled in, the device number takes priority. |
UUID, major, minor | is | UUID, major, minor. The three information must be filled in completely. If the device number is filled in, this information does not need to be filled in. |
comment | is the comment information of the | device, not More than 15 Chinese characters or 30 English letters. |
Return instructions
Example of normal returned JSON data packet:
{ "data": { }, "errcode": 0, "errmsg": "success." }
Configure the relationship between the device and the store
Interface Description
It supports directly linking the store to the device after creating it. There is no need to pass the review status. Shake the surrounding background to automatically update the latest information and status of the store.
Interface call description
http请求方式: POST(请使用https协议)https://api.weixin.qq.com/shakearound/device/bindlocation?access_token=ACCESS_TOKENPOST数据格式:json POST数据例子: { "device_identifier":{ "device_id":10011, "uuid":"FDA50693-A4E2-4FB1-AFCF-C6EB07647825", "major":1002, "minor":1223 }, "poi_id": 1231, }
Parameter description
Parameter | Is it required | Description |
---|---|---|
access_token | is the | calling interface credential |
device_identifier | is the device ID | specified by |
##device_id | is | Device number. If UUID, major, and minor are filled in, the device number is not required. If both are filled in, the device number takes priority. |
UUID, major, minor | is | UUID, major, minor. The three information must be filled in completely. If the device number is filled in, this information does not need to be filled in. |
poi_id | is the store ID associated with the | device, After the store is associated, there will be an opportunity to give priority to information within 1KM of the store. When the value is 0, the store ID associated with the device will be cleared. For specific store-related information, you canView the store-related interface documents |
Return instructions
Example of normal returned JSON data packet:
{ "data": { }, "errcode": 0, "errmsg": "success." }
Configure the association between the device and other public account stores
Interface description
Stores that support device association with other public accounts, the store needs to be Approval status.
Because the third-party store does not belong to this public account, it is not saved in the device details. The query device list interface and the interface for obtaining peripheral equipment and user information will not return to the third-party store. . If you need verification, please use Shake to follow JS API verification.
If the device is bound to its own store, it will automatically block third-party store related functions.
Interface call description
http请求方式: POST(请使用https协议)https://api.weixin.qq.com/shakearound/device/bindlocation?access_token=ACCESS_TOKENPOST数据格式:json POST数据例子: { "device_identifier":{ "device_id":10011, "uuid":"FDA50693-A4E2-4FB1-AFCF-C6EB07647825", "major":1002, "minor":1223 }, "poi_id": 1231, "type": 2, "poi_appid": "wxappid" }
Parameter description
Parameter | Is it required | Description |
---|---|---|
access_token | is the | calling interface credential |
device_identifier | is the device ID specified by | |
##device_id | is | Device number. If UUID, major, and minor are filled in, the device number is not required. If both are filled in, the device number takes priority. |
UUID, major, minor | is | UUID, major, minor. The three information must be filled in completely. If the device number is filled in, this information does not need to be filled in. |
poi_id | is the store ID associated with the | device, After the store is associated, there will be an opportunity to give priority to information within 1KM of the store. When the value is 0, the store ID associated with the device will be cleared. For specific store-related information, you canView the store-related interface document |
Type | No, If left blank, the default value is 1 | . When it is 1, the associated stores and devices belong to the same public account; When is 2, the associated store is the store of other public accounts |
Poi_appid | When Type is 2, required | The APPID of the public account to which the associated store belongs |
Return instructions Normal return JSON data packet example:
{ "data": { }, "errcode": 0, "errmsg": "success." }
Query device List
Interface description
Query existing device ID, UUID, Major, Minor , activation status, remark information, associated stores, associated pages and other information. You can specify the device ID or complete UUID, Major, and Minor queries, and you can also pull device information lists in batches. The device list returned by the query is sorted in positive order by device ID.
Interface call description
http请求方式: POST(请使用https协议)https://api.weixin.qq.com/shakearound/device/search?access_token=ACCESS_TOKENPOST数据格式:json POST数据例子: 查询指定设备时: { "type": 1, "device_identifiers":[ { "device_id":10100, "uuid":"FDA50693-A4E2-4FB1-AFCF-C6EB07647825", "major":10001, "minor":10002 } ] } 需要分页查询或者指定范围内的设备时: { "type": 2, "last_seen": 10097, "count": 3 } 当需要根据批次ID查询时: { "type": 3, "apply_id": 1231, "last_seen": 10097, "count": 3 }
Parameter description
Parameter | Is it required | Description |
---|---|---|
access_token | is the | calling interface credential |
type | is the | query type.1: Query the devices in the device ID list; 2: Query all device information in paging; 3: Query all device information in a certain application in paging |
device_identifiers | is the device specified by | ; when type is 1, this item is required |
device_id | is the | device number. If UUID, major, and minor are filled in, the device number does not need to be filled in. If both are filled in, the device number takes priority; when querying the specified device, the number of devices queried at a time cannot exceed 50 |
UUID, major, minor | is | UUID, major, and minor. The three information must be filled in completely. If the device number is filled in, this information does not need to be filled in. ;When querying the specified device, the number of devices queried at a time cannot exceed 50 |
apply_id | ##Yes | Batch ID, the batch ID returned when applying for a device ID; when type is 3, this item is required |
last_seen | is | The device ID at the end of the previous query list, the first query last_seen is 0 |
count | is | The number of devices to be queried cannot exceed 50 |
Return instructions
Example of normal returned JSON data packet:
{ "data": { "devices": [ { "comment": "", "device_id": 10097, "major": 10001, "minor": 12102, "status": 1, "last_active_time":1437276018, "poi_id": 0, "uuid": "FDA50693-A4E2-4FB1-AFCF-C6EB07647825" }, { "comment": "", "device_id": 10098, "major": 10001, "minor": 12103, "status": 1, "last_active_time":1437276018, "poi_appid":"wxe3813f5d8c546fc7" "poi_id": 123, "uuid": "FDA50693-A4E2-4FB1-AFCF-C6EB07647825" } ], "total_count": 151 }, "errcode": 0, "errmsg": "success." }
Parameter Description
Parameters | Description |
---|---|
devices | Specified device information list |
device_id | Device number |
UUID, major, minor | UUID, major, minor |
status | Activation status, 0: not activated, 1: activated |
last_active_time | The date when the device was last shaken (only the data of the previous day can be obtained at the earliest); the value of this field for newly applied devices is 0 |
poi_appid | If the device is configured to associate with other public account stores, the public account appid belonging to the configured store is returned. ViewConfiguring the interface between the device and other public account stores |
##poi_id | The store ID associated with the device. After the store is associated, there will be an opportunity to give priority to information within 1KM of the store. For specific store-related information, pleaseView the store-related interface documentation |
Remarks information of the equipment | |
The total number of equipment under the merchant’s name |
##