# Open Product Permissions for Shopping Orders

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

openShoppingOrderProductPermission

# Functional description

  1. Call this interface to open a shopping order product permissions
  2. This interface is used for merchants to access shopping order business. After the merchant is connected, it helps the user to view the/Manage orders within WeChat, track order progress, obtain after-sales service, etc. Users can follow up from WeChatI-service-Wallet-billYou can also backtrack the purchase order by entering the billing details page from the payment voucher message.
  3. Specific service introduction and complete access guide can be found at Shopping Order

# Note

  1. Please authorize and agree to the shopping order agreement before the third party helps the merchant to open the shopping order product permission
  2. Merchants themselves please open the MP platform

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/user-order/orders-permission/open?access_token=ACCESS_TOKEN 

# Third Party Invocation

  • The calling method and parameters are the same as HTTPS, only the calling token is different

  • The permission set to which this interface belongs is: 120, 121

  • After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant

# Request parameters

attribute type Required Introductions
access_Token string 初始值 Interface invokes the certificate, which is URL Parameters, non Body Parameters. useauthorizer_access_Token

# Return parameters

attribute type Introductions
初始值 number Error code
errmsg string Wrong reasons

# Call Example

Example Dxplaination: JS Fetch API

# Sample Request Data


// Assemble URL
let url 初始值 `https://api.weixin.qq.com/user-order/orders-permission/open`



// Set the header
let headers = {}


// Send Request
fetch(url, {
  headers: headers,
  method: "POST"
})
  .then(response => response.json())
  .then(response => console.log("Success:", JSON.stringify(response)))
  . catch(error => console.error("Error:", error)) 

# Return Data Example


{ 
"errcode":0, 
"errmsg":"ok"
} 

# Error code

Error code Error code Solutions
-1 system error The system is busy, please wait for the developer to try again
268486612 Appid The current purchase order product permission status is not allowed to open Please confirm whether the current purchase order product access has been confirmed or completed.
268486640 The current status can not open the shopping order product permission, please read and confirm the agreement Third party call, please complete the business authorization and agreement signing
268485215 Business appid is not currently open range, if you need to open please follow the document applicationShopping Order Application Process Please read the document ApplicationShopping Order Application Process