取得客戶直接簽署(直接接受)Microsoft客戶合約的狀態
適用於:合作夥伴中心
不適用於:由 21Vianet 營運的合作夥伴中心 |美國政府Microsoft雲端合作夥伴中心
DirectSignedCustomerAgreementStatus 資源目前僅受合作夥伴中心Microsoft公用雲端支援。
本文說明如何擷取客戶直接接受Microsoft客戶合約的狀態。
先決條件
合作夥伴中心身分驗證中所述的憑證。 此案例僅支援使用 App+User 認證進行驗證。
客戶標識碼 (
customer-tenant-id
)。 如果您不知道客戶的標識碼,您可以在 合作夥伴中心 中選取 [客戶 工作區],然後從客戶清單中選取客戶,再選取 帳戶來查閱。 在客戶的 [帳戶] 頁面上,在 [客戶帳戶資訊] 區段中尋找 Microsoft ID。 Microsoft識別碼與客戶標識碼 (customer-tenant-id
) 相同。間接提供者或直接帳單合作夥伴必須與客戶有主動轉售關係,才能擷取合約的直接簽署狀態。
C#
若要擷取客戶直接接受 Microsoft 客戶合約的狀態,請使用以客戶標識符呼叫 IAggregatePartner.Customers.ById 方法。 接著使用 合約 屬性來擷取 ICustomerAgreementCollection 接口。 最後,呼叫 GetDirectSignedCustomerAgreementStatus()
或 GetDirectSignedCustomerAgreementStatusAsync()
以擷取狀態。
// IAggregatePartner partnerOperations;
// string customerId;
var customerDirectSigningStatus = partnerOperations.Customers.ById(selectedCustomerId).Agreements.GetDirectSignedCustomerAgreementStatus();
範例:主控台範例應用程式。 Project:SdkSamples 類別: GetDirectSignedCustomerAgreementStatus.cs
REST 要求
若要擷取客戶直接接受 Microsoft 客戶協議的狀態,請建立 REST 請求來擷取客戶的 DirectSignedCustomerAgreementStatus。
請求語法
使用下列要求語法。
方法 | 要求 URI |
---|---|
獲取 | {baseURL}/v1/customers/{customer-tenant-id}/directSignedMicrosoftCustomerAgreementStatus HTTP/1.1 |
URI 參數
您可以搭配您的要求使用下列 URI 參數:
名字 | 類型 | 必填 | 描述 |
---|---|---|---|
客戶租戶 ID | 全球唯一識別碼 (GUID) | 是的 | 此值是 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: aaaa0000-bb11-2222-33cc-444444dddddd
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: aaaa0000-bb11-2222-33cc-444444dddddd
{"isSigned":true}