提交評論的回應Submit responses to reviews

使用 Microsoft Store 評論 API 中的此方法,以程式設計方式回應您 app 的評論。Use this method in the Microsoft Store reviews API to programmatically respond to reviews of your app. 當您呼叫這個方法時,您必須指定您想要回應的評論的識別碼。When you call this method, you must specify the IDs of the reviews you want to respond to. 評論識別碼是在 Microsoft Store 分析 API 取得 app 評論方法的回應資料中,以及評論報告離線下載中。Review IDs are available in the response data of the get app reviews method in the Microsoft Store analytics API and in the offline download of the Reviews report.

當客戶提交評論時,他們可以選擇不接收評論的回應。When a customer submits a review, they can choose not to receive responses to their review. 如果您嘗試回應到客戶選擇不收到回應的評論,這個方法的回應主體會指出回應嘗試已失敗。If you try to respond to a review for which the customer chose not to receive responses, the response body of this method will indicate that the response attempt was unsuccessful. 呼叫這個方法之前,您可以使用取得應用程式評論的回應資訊方法,選擇判斷是否允許您回應特定評論。Before calling this method, you can optionally determine whether you are allowed to respond to a given review by using the get response info for app reviews method.

注意

除了使用這個方法以程式設計方式回應評論,您也可以 使用合作夥伴中心來回應評論。In addition to using this method to programmatically respond to reviews, you can alternatively respond to reviews using Partner Center.

必要條件Prerequisites

若要使用這個方法,您必須先進行下列動作:To use this method, you need to first do the following:

  • 如果您尚未這樣做,請先完成 Microsoft Store 評論 API 的所有先決條件If you have not done so already, complete all the prerequisites for the Microsoft Store reviews API.
  • 取得 Azure AD 存取權杖以便用於這個方法的要求標頭。Obtain an Azure AD access token to use in the request header for this method. 在您取得存取權杖之後,您有 60 分鐘的使用時間,之後其便會到期。After you obtain an access token, you have 60 minutes to use it before it expires. 權杖到期之後,您可以取得新的權杖。After the token expires, you can obtain a new one.
  • 取得您想要回應之評論的識別碼。Get the IDs of the reviews you want to respond to. 評論識別碼是在 Microsoft Store 分析 API 取得 app 評論方法的回應資料中,以及評論報告離線下載中。Review IDs are available in the response data of the get app reviews method in the Microsoft Store analytics API and in the offline download of the Reviews report.

要求Request

要求的語法Request syntax

方法Method 要求 URIRequest URI
POSTPOST https://manage.devcenter.microsoft.com/v1.0/my/reviews/responses

要求標頭Request header

標頭Header 類型Type 描述Description
授權Authorization 字串string 必要。Required. Azure AD 存取權杖,形式為 Bearer <token>。The Azure AD access token in the form Bearer <token>.

要求參數Request parameters

這個方法沒有任何要求參數。This method has no request parameters.

Request bodyRequest body

要求主體包含下列值。The request body has the following values.

Value 類型Type 描述Description
回應Responses arrayarray 物件陣列,包含您想要提交的回應資料。An array of objects that contain the response data you want to submit. 如需有關每個物件中資料的詳細資訊,請參閱下表。For more information about the data in each object, see the following table.

Responses 陣列中的每個物件包含下列值。Each object in the Responses array contains the following values.

Value 類型Type 描述Description 必要Required
ApplicationIdApplicationId 字串string 您想要回應評論之 App 的「Store 識別碼」。The Store ID of the app with the review you want to respond to. Store 識別碼可在合作夥伴中心的 [應用程式識別] 頁面 上取得。The Store ID is available on the App identity page of Partner Center. 舉例來說,Store 識別碼可以是「9WZDNCRFJ3Q8」。An example Store ID is 9WZDNCRFJ3Q8. Yes
ReviewIdReviewId 字串string 您想要回應評論的識別碼 (這是 GUID)。The ID of the review you want to respond to (this is a GUID). 評論識別碼是在 Microsoft Store 分析 API 取得 app 評論方法的回應資料中,以及評論報告離線下載中。Review IDs are available in the response data of the get app reviews method in the Microsoft Store analytics API and in the offline download of the Reviews report. Yes
ResponseTextResponseText 字串string 您想要提交的回應。The response you want to submit. 您的回應必須依照這些指導方針Your response must follow these guidelines. Yes
SupportEmailSupportEmail 字串string 您 app 的支援電子郵件地址,客戶可以用來直接連絡您。Your app's support email address, which the customer can use to contact you directly. 這必須是有效的電子郵件地址。This must be a valid email address. Yes
IsPublicIsPublic 布林值Boolean 如果您指定 true,您的回應會顯示在應用程式的 Store 清單中,緊接在客戶的評論正下方,而且所有客戶都可以看到。If you specify true, your response will be displayed in your app's Store listing, directly below the customer's review, and will be visible to all customers. 如果您指定 false ,而使用者未選擇不接受接收電子郵件回應,則您的回應將會透過電子郵件傳送給客戶,而在您應用程式的 Store 清單中,其他客戶將看不到它。If you specify false and the user hasn't opted out of receiving email responses, your response will be sent to the customer via email, and it will not be visible to other customers in your app's Store listing. 如果您指定 false ,而使用者選擇不接收電子郵件回應,則會傳回錯誤。If you specify false and the user has opted out of receiving email responses, an error will be returned. Yes

要求範例Request example

以下範例示範如何使用此方法,針對幾個評論提交回應。The following example demonstrates how to use this method to submit responses to several reviews.

POST https://manage.devcenter.microsoft.com/v1.0/my/reviews/responses HTTP/1.1
Authorization: Bearer <your access token>
Content-Type: application/json
{
  "Responses": [
    {
      "ApplicationId": "9WZDNCRFJ3Q8",
      "ReviewId": "6be543ff-1c9c-4534-aced-af8b4fbe0316",
      "ResponseText": "Thank you for pointing out this bug. I fixed it and published an update, you should have the fix soon",
      "SupportEmail": "support@contoso.com",
      "IsPublic": true
    },
    {
      "ApplicationId": "9NBLGGH1RP08",
      "ReviewId": "80c9671a-96c2-4278-bcbc-be0ce5a32a7c",
      "ResponseText": "Thank you for submitting your review. Can you tell more about what you were doing in the app when it froze? Thanks very much for your help.",
      "SupportEmail": "support@contoso.com",
      "IsPublic": false
    }
  ]
}

回應Response

回應本文Response body

Value 類型Type 描述Description
結果Result arrayarray 物件陣列,包含您所送出每個回覆的相關資料。An array of objects that contain data about each response you submitted. 如需有關每個物件中資料的詳細資訊,請參閱下表。For more information about the data in each object, see the following table.

Result 陣列中的每個物件包含下列值。Each object in the Result array contains the following values.

Value 類型Type 描述Description
ApplicationIdApplicationId 字串string 您已回應評論之 App 的「Store 識別碼」。The Store ID of the app with the review you responded to. 舉例來說,Store 識別碼可以是「9WZDNCRFJ3Q8」。An example Store ID is 9WZDNCRFJ3Q8.
ReviewIdReviewId 字串string 您已回應之評論的識別碼。The ID of the review you responded to. 這是 GUID。This is a GUID.
成功Successful 字串string true 指出已成功傳送您的回應。The value true indicates that your response was sent successfully. false 表示您的回應未成功。The value false indicates that your response was unsuccessful.
FailureReasonFailureReason 字串string 如果 Successfulfalse,這個值包含失敗原因。If Successful is false, this value contains a reason for the failure. 如果 Successfultrue,這個值是空的。If Successful is true, this value is empty.

回應範例Response example

下列範例針對此要求示範範例 JSON 回應主體。The following example demonstrates an example JSON response body for this request.

{
  "Result": [
    {
      "ApplicationId": "9WZDNCRFJ3Q8",
      "ReviewId": "6be543ff-1c9c-4534-aced-af8b4fbe0316",
      "Successful": "true",
      "FailureReason": ""
    },
    {
      "ApplicationId": "9NBLGGH1RP08",
      "ReviewId": "80c9671a-96c2-4278-bcbc-be0ce5a32a7c",
      "Successful": "false",
      "FailureReason": "No Permission"
    }
  ]
}