# results-page

To access the WeChat city service, the business side shall ensure the closed-loop service experience of the function and access the message path.Click here for City Services Message Path instructions

# Call method

# 1. Interface call request

Request method: POST Address requested:https://api.weixin.qq.com/cityservice/sendmsgdata?access_token=ACCESS_TOKEN

(1) Get access_Token method pleaseClick here to viewGet the openid way pleaseClick here to view

(B) When providing services via an Mini Program, the Mini Program user is required openid That is associated with the Mini Program and that has applied the message path Official Account message template of access_token

# The parameters in json format are passed in POST.

(1) After the template application is successful, the distribution will bewe_template_idAnd provide style ID according to the template push channel:result_page_style_iddeal_msg_style_idcard_style_id

(2) When calling the interface, pass the following parameters in json format by POST. The data type of all parameters is "string," and the character set defaults to UTF-8.

Field explaination

parameter Introductions Required Required
openid User unique identification Required
we_template_id City services are allocated to Official Account message template Template id Required
result_page_style_id Result page style id Page with results required
deal_msg_style_id Business Record Style id Including service records required
card_style_id Page card style id Required Page Included Card
order_No Order number, the same order number transaction records will be merged Required
url Jump links for service notifications, results pages, to-do reminders Page with results required
data Template json data, where the color field is only valid for service notifications Required

Examples of parameters

                   "first": {
                       "value": "Congratulations on your purchase! " ,
                       “value” : “巧克力” , 
                   "keynote2": {
                       "value": "$39.8,"
                   "keynote3": {
                       "value": "22 September 2014"
                       "value": "Welcome to buy again! " ,

Note: Used when data is an array[ ]Enclose the data in the data field.

3, return code explaination

After calling the message path interface, return the JSON packet:

Return Results Return code Introductions
result_page_url Result page url You need to jump to this URL to replace the service results page. If not passed inresult_page_style_idThen, after callingresult_page_urlReturns empty.
Errcode 48001 Api unauthorized
Errcode 40097 1. Parameter error. 2. Or the openid does not come from the message path api permission Official Account message template
Errcode 82020 Not concerned Official Account message template Users who have never accessed the service at the city service
Errcode 82021 Not concerned Official Account message template Customers who have not accessed the service through City Services in the last 30 days
Errcode 82022 Not concerned Official Account message template After accessing the service through City Services, more than 10 times (more than 20 times in the medical industry) within 30 days
Errcode 82023 Not concerned Official Account message template More than 5 times in an hour
Errcode 82024 order_No exception, such as all users using the same business order number
Errcode 82025 URL invalid
Errcode 82026 1. The service is offline. 2. Or the service is under review and has exceeded 30 days

Example of a normal return JSON packet:

"result_page_url":"https://city.WeChat.qq.com/static/resultpagenew.html?openid=ont-9vjAcIdSU-LgB7ubALAVJO9U&biz_template_id=ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY #wechat_redirect"

Note: if the result page style id is not passed inresult_page_style_id), thenresult_page_urlResult is empty

# 4, page error tips

Message Information Introductions
Chinese display error Character set not utf8
Parameter error JSON parameter error
Not me, the page failed to open Not I openid Or login failed.
Please open in WeChat Need to open the page in WeChat
System error Other errors