Get the partner legal business profile
Applies to: Partner Center | Partner Center operated by 21Vianet | Partner Center for Microsoft Cloud for US Government
How to get a partner's legal business profile.
Prerequisites
- Credentials as described in Partner Center authentication. This scenario supports authentication with both standalone App and App+User credentials.
C#
To get the partner legal business profile, first get an interface to the collection of partner profile operations from the IAggregatePartner.Profiles property. Then, get the value of the LegalBusinessProfile property to retrieve an interface to legal business profile operations. Finally, call the Get or the GetAsync method to retrieve the profile.
// IAggregatePartner partnerOperations;
var billingProfile = partnerOperations.Profiles.LegalBusinessProfile.Get();
Sample: Console test app. Project: Partner Center SDK Samples Class: GetLegalBusinessProfile.cs
REST request
Request syntax
Method | Request URI |
---|---|
GET | {baseURL}/v1/profiles/legalbusiness 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/profiles/legalbusiness?vettingVersion=Current HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 7391249f-cba0-467c-b026-7b3a60196422
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
Host: api.partnercenter.microsoft.com
Connection: Keep-Alive
REST response
If successful, this method returns a LegalBusinessProfile object in the response body.
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: 1151
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 7391249f-cba0-467c-b026-7b3a60196422
MS-CV: MEgCpJUoGUeXG+4a.0
MS-ServerId: 030011719
Date: Tue, 21 Mar 2017 17:29:52 GMT
{
"companyName": "Lucerne Publishing",
"address": {
"country": "US",
"city": "Buffalo",
"state": "NY",
"addressLine1": "123 Main Street",
"addressLine2": "",
"postalCode": "98052",
"firstName": "Gena",
"lastName": "Soto",
"phoneNumber": "4255550100"
},
"primaryContact": {
"firstName": "Gena",
"lastName": "Soto",
"email": "gena@lucernepublishing.com",
"phoneNumber": "4255550100"
},
"companyApproverAddress": {
"country": "US",
"city": "Buffalo",
"state": "NY",
"addressLine1": "123 Main Street",
"addressLine2": "",
"postalCode": "98052"
},
"companyApproverEmail": "gena@lucernepublishing.com",
"vettingStatus": "authorized",
"vettingSubStatus": "none",
"profileType": "LegalBusinessProfile",
"links": {
"self": {
"uri": "/profiles/legalbusiness",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "LegalBusinessProfile"
}
}