# Message push interface
Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide
Interface name: cityservice_sendchannelmsg
Used for sending medical assistant message, combined with general parameters and different sub-status parameters combination to achieve various types of business message push
# 1. How to call
# HTTPS calls
POST https://api.weixin.qq.com/cityservice/sendchannelmsg?access_token=ACCESS_TOKEN
# Cloud Calls
- This interface does not support cloud calls
# Third party invocation
This interface supports Third Party Platform generation business call.
This interface belongs to the permission set id: 22, 105, 113, 134
When a service provider is authorized by one of the permissions set, it can call on behalf of the merchant by using authorizer_access_token , which can be viewed in the third-party call documentation.
# 2. Request parameters
# Query parametersQuery String parameters
Parameter Name | type | Required to fill in | Example | Introductions |
---|---|---|---|---|
access_token | string | yes | ACCESS_TOKEN | Interface invocation credentials, using access_token , authorizer_access_token |
# Request BodyRequest Payload
Parameter Name | type | Required to fill in | Example | Introductions |
---|---|---|---|---|
status | number | yes | 1501001 | Message substate (e.g.: 1501001 - Notification of successful appointment registration) |
open_id | string | yes | osdjkfhsdlkfjhdslkjfh | User openid (Official Account / Weixin Mini Program) |
order_id | string | yes | order_123456 | Unique order ID generated by the business side |
msg_id | string | yes | msg_0001 | Message unique identity (need to ensure that the user with the same order_id unique) |
app_id | string | yes | wx23dde3xd34569cba | Official Account AppID (Medical assistant required) |
business_id | number | yes | 150 | Fixed value 150 |
business_info | string | no | {"pat_name": "Li Yulong," "doc_name": "Wang Xiaoer"} | Business fields (different status corresponding to different structures) |
# 3. Return Parameters
# Response Payload
Parameter Name | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
# 4. Note
- Official Account / Weixin Mini Program Weixin Mini Program
- You need to start using medical assistant capabilities first.
- access_token calls with Official Account
- The same order_id must be used for the same medical procedure
# 5. Code examples
Example Requests
{
"status": 1501001,
"open_id": "osdjkfhsdlkfjhdslkjfh",
"order_id": "order_123456",
"msg_id": "msg_0001",
"app_id": "wx23dde3xd34569cba",
"business_id": 150,
"business_info": {
"pat_name": "李*龙",
"doc_name": "王小二",
"pat_hospital_id": "a123456",
"department_name": "门诊3楼五官科",
"appointment_time": "2023-06-07 10:30-11:00",
"redirect_page": {
"page_type": "web",
"url": "https:zhongshanyi.com/guahao?order_id=order1"
}
}
}
Return an example
{
"errcode": 0,
"errmsg": "ok"
}
# 6. Error code
The following is a list of error codes for this interface, other error codes can refer to General error codes
Error code | Error Description | Solutions |
---|---|---|
0 | ok | success |
40001 | invalid credential | Illegal access_token |
# 7. Scope of application
The interface has not yet clarified the types of account numbers that can be invoked, or determined whether they can be invoking based on the invoking reference in the business, provided that the actual call is already made.