שתף באמצעות


Retrieve a relationship request URL

Applies to: Partner Center | Partner Center operated by 21Vianet | Partner Center for Microsoft Cloud for US Government

How to retrieve a relationship request URL to send to a customer.

Prerequisites

C#

To retrieve a relationship request URL, first use IAggregatePartner.Customers to get an interface to the partner's customer operations. Next, use the RelationshipRequest property to get an interface to customer relationship request operations. Finally, call the Get or GetAsync method to retrieve the URL.

// IAggregatePartner partnerOperations;

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

Sample: Console test app. Project: Partner Center SDK Samples Class: GetCustomerRelationshipRequest.cs

REST request

Request syntax

Method Request URI
GET {baseURL}/v1/customers/relationshiprequests HTTP/1.1

Request headers

For more information, see Partner Center REST headers.

Request body

None

Request example

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: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
Host: api.partnercenter.microsoft.com
Connection: Keep-Alive

REST response

If successful, the response contains the RelationshipRequest object.

Response success and error codes

Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. For the full list, see Partner Center REST error codes.

Response example

HTTP/1.1 200 OK
Content-Length: 196
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
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"
    }
}