共用方式為


擷取關聯性的要求 URL

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

如何擷取要傳送給客戶的關聯性要求URL。

必要條件

  • 認證,如合作夥伴中心驗證所述。 此案例僅支援使用「應用程式+使用者」認證來進行驗證。

C#

若要擷取關聯性要求 URL,請先使用 IAggregatePartner.Customers 來取得合作夥伴客戶作業的介面。 接下來,使用 RelationshipRequest 屬性來取得客戶關係要求作業的介面。 最後,呼叫 GetGetAsync 方法來擷取 URL。

// IAggregatePartner partnerOperations;

var customerRelationshipRequest = partnerOperations.Customers.RelationshipRequest.Get();

範例控制台測試應用程式專案:合作夥伴中心 SDK 範例 類別:GetCustomerRelationshipRequest.cs

REST 要求

要求語法

方法 要求 URI
GET {baseURL}/v1/customers/relationshiprequests HTTP/1.1

要求標頭

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

要求本文

要求範例

GET https://api.partnercenter.microsoft.com/v1/customers/relationshiprequests HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: ee519026-4c67-4113-bec7-a38aca621bf0
MS-CorrelationId: 02971f0f-1029-47b2-9fdb-1932f0987470
X-Locale: en-US
Host: api.partnercenter.microsoft.com
Connection: Keep-Alive

REST 回應

如果成功,回應會 包含 RelationshipRequest 物件。

回應成功和錯誤碼

每個回應都隨附 HTTP 狀態碼,會指出成功與否以及其他的偵錯資訊。 請使用網路追蹤工具來讀取此錯誤碼、錯誤類型和其他參數。 如需完整清單,請參閱合作夥伴中心的 REST 錯誤碼

回應範例

HTTP/1.1 200 OK
Content-Length: 196
Content-Type: application/json; charset=utf-8
MS-CorrelationId: 02971f0f-1029-47b2-9fdb-1932f0987470
MS-RequestId: ee519026-4c67-4113-bec7-a38aca621bf0
MS-CV: jbYZRWjU3E262f8o.0
MS-ServerId: 030020643
Date: Fri, 19 May 2017 22:32:07 GMT

{
    "url": "https://admin.microsoft.com/Adminportal/Home?invType=ResellerRelationship&partnerId=3b33e682-00c3-41ee-9dd2-a548adf56438&msppId=0#/partners/invitation",
    "attributes": {
        "objectType": "RelationshipRequest"
    }
}