認可附加元件提交Commit an add-on submission

在 Microsoft Store 提交 API 中使用這個方法,以認可新的或更新附加元件 (也稱為應用程式內產品或 IAP) 提交至合作夥伴中心。Use this method in the Microsoft Store submission API to commit a new or updated add-on (also known as in-app product or IAP) submission to Partner Center. 認可動作警示合作夥伴中心,提交資料已上傳 (包括任何相關的圖示)。The commit action alerts Partner Center that the submission data has been uploaded (including any related icons). 在回應中,合作夥伴中心會認可的變更,提交資料的擷取及發行。In response, Partner Center commits the changes to the submission data for ingestion and publishing. 認可作業成功後,提交的變更會顯示在合作夥伴中心。After the commit operation succeeds, the changes to the submission are shown in Partner Center.

如需認可作業如何在使用 Microsoft Store 提交 API 提交附加元件的程序中進行的詳細資訊,請參閱管理附加元件提交For more information about how the commit operation fits into the process of submitting an add-on by using the Microsoft Store submission API, see Manage add-on submissions.

先決條件Prerequisites

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

要求Request

這個方法的語法如下。This method has the following syntax. 請參閱下列各小節了解標頭和要求本文的使用範例和描述。See the following sections for usage examples and descriptions of the header and request body.

方法Method 要求 URIRequest URI
POSTPOST https://manage.devcenter.microsoft.com/v1.0/my/inappproducts/{inAppProductId}/submissions/{submissionId}/commit

要求的標頭Request header

標頭Header 類型Type 描述Description
AuthorizationAuthorization 字串string 必要。Required. 在表單中的 Azure AD 存取權杖持有人 <語彙基元>。The Azure AD access token in the form Bearer <token>.

要求參數Request parameters

名稱Name 類型Type 描述Description
inAppProductIdinAppProductId 字串string 必要。Required. 包含您想要認可提交之附加元件的市集識別碼。The Store ID of the add-on that contains the submission you want to commit. 存放區的識別碼在合作夥伴中心,而且它包含在要求的回應資料取得所有附加元件建立附加元件The Store ID is available in Partner Center, and it is included in the response data for requests to Get all add-ons and Create an add-on.
submissionIdsubmissionId 字串string 必要。Required. 您想要認可之提交的識別碼。The ID of the submission you want to commit. 建立附加元件提交要求的回應資料中有提供此識別碼。This ID is available in the response data for requests to create an add-on submission. 提交在合作夥伴中心所建立,此識別碼也會提供在合作夥伴中心內的 [提交] 頁面的 url。For a submission that was created in Partner Center, this ID is also available in the URL for the submission page in Partner Center.

要求本文Request body

不提供此方法的要求本文。Do not provide a request body for this method.

要求範例Request example

下列範例示範如何認可附加元件提交。The following example demonstrates how to commit an add-on submission.

POST https://manage.devcenter.microsoft.com/v1.0/my/inappproducts/9NBLGGH4TNMP/submissions/1152921504621230023/commit HTTP/1.1
Authorization: Bearer <your access token>

回應Response

下列範例示範成功呼叫此方法時的 JSON 回應主體。The following example demonstrates the JSON response body for a successful call to this method. 如需回應本文中各個值的詳細資訊,請參閱下列各節。For more details about the values in the response body, see the following sections.

{
  "status": "CommitStarted"
}

回應主體Response body

Value 類型Type 描述Description
statusstatus 字串string 提交的狀態。The status of the submission. 這可以是下列其中一個值:This can be one of the following values:
  • NoneNone
  • CanceledCanceled
  • PendingCommitPendingCommit
  • CommitStartedCommitStarted
  • CommitFailedCommitFailed
  • PendingPublicationPendingPublication
  • PublishingPublishing
  • PublishedPublished
  • PublishFailedPublishFailed
  • PreProcessingPreProcessing
  • PreProcessingFailedPreProcessingFailed
  • CertificationCertification
  • CertificationFailedCertificationFailed
  • 發行Release
  • ReleaseFailedReleaseFailed

錯誤碼Error codes

如果要求無法順利完成,則回應會包含下列其中一個 HTTP 錯誤碼。If the request cannot be successfully completed, the response will contain one of the following HTTP error codes.

錯誤碼Error code 描述Description
400400 要求參數無效。The request parameters are invalid.
404404 找不到指定的提交。The specified submission could not be found.
409409 找不到指定的提交,但無法認可目前的狀態,或附加元件會使用合作夥伴中心功能目前不支援 Microsoft Store 提交 APIThe specified submission was found but it could not be committed in its current state, or the add-on uses a Partner Center feature that is currently not supported by the Microsoft Store submission API.