分享方式:


取得客戶的直接簽署狀態(直接接受)Microsoft 客戶合約

適用於:合作夥伴中心

不適用:由 21Vianet 營運的合作夥伴中心 |美國政府適用的 Microsoft Cloud 合作夥伴中心

合作夥伴中心目前僅在 Microsoft 公用雲端中支援 DirectSignedCustomerAgreementStatus 資源。

本文說明如何擷取客戶直接接受 Microsoft 客戶合約 的狀態。

必要條件

C#

若要擷取客戶直接接受 Microsoft 客戶合約 的狀態,請使用客戶標識符呼叫 IAggregatePartner.Customers.ById 方法。 然後使用 Agreements 屬性來擷取 ICustomerAgreementCollection 介面。 最後,呼叫 GetDirectSignedCustomerAgreementStatus()GetDirectSignedCustomerAgreementStatusAsync() 以擷取狀態。

// IAggregatePartner partnerOperations;
// string customerId;
var customerDirectSigningStatus = partnerOperations.Customers.ById(selectedCustomerId).Agreements.GetDirectSignedCustomerAgreementStatus();

範例主控台範例應用程式專案:SdkSamples 類別:GetDirectSignedCustomerAgreementStatus.cs

REST 要求

若要擷取客戶直接接受 Microsoft 客戶合約 的狀態,請建立 REST 要求來擷取客戶的 DirectSignedCustomerAgreementStatus

要求語法

使用下列要求語法:

方法 要求 URI
GET {baseURL}/v1/customers/{customer-tenant-id}/directSignedMicrosoftCustomerAgreementStatus HTTP/1.1

URI 參數

您可以搭配您的要求使用下列 URI 參數:

名稱 類型​​ 必要 描述
customer-tenant-id GUID Yes 此值是 GUID 格式 的 CustomerTenantId ,可讓您指定客戶的租用戶識別碼。

要求標頭

如需詳細資訊,請參閱合作夥伴中心 REST 標頭

要求本文

無。

要求範例

GET https://api.partnercenter.microsoft.com/v1/customers/14876998-c0dc-46e6-9d0c-65a57a6c32ec/directSignedMicrosoftCustomerAgreementStatus HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 94e4e214-6b06-4fb7-96d1-94d559f9b47f
MS-CorrelationId: ab993325-1605-4cf4-bac4-fb584142a31b

REST 回應

如果成功,這個方法會在回應本文中傳 回 DirectSignedCustomerAgreementStatus 資源

資源具有 isSigned 屬性,表示客戶的直接簽署(直接接受)狀態。

  • true表示合約已由客戶直接簽署(已接受)。

  • false表示合約尚未由客戶直接簽署(已接受)。

回應成功和錯誤碼

每個回應都有一個 HTTP 狀態代碼,指出成功或失敗,以及更多偵錯資訊。

使用網路追蹤工具來讀取此程式代碼、錯誤類型和其他參數。 如需完整清單,請參閱合作夥伴中心的 REST 錯誤碼

回應範例

HTTP/1.1 200 OK
Content-Length: 20
Content-Type: application/json
MS-RequestId: 94e4e214-6b06-4fb7-96d1-94d559f9b47f
MS-CorrelationId: ab993325-1605-4cf4-bac4-fb584142a31b

{"isSigned":true}