取得合作夥伴的合法商務設定檔
適用于:合作夥伴中心 |由 21Vianet 營運的合作夥伴中心 |適用于 Microsoft Cloud for US Government 的合作夥伴中心
如何取得合作夥伴的法律商務設定檔。
必要條件
- 認證,如合作夥伴中心驗證所述。 此案例支援使用獨立應用程式和 App+使用者認證進行驗證。
C#
若要取得合作夥伴合法商務設定檔,請先從 IAggregatePartner.Profiles 屬性取得合作夥伴設定檔作業集合的介面。 然後,取得 LegalBusinessProfile 屬性的值,以擷取合法商務設定檔作業的介面。 最後,呼叫 Get 或 GetAsync 方法來擷取設定檔。
// IAggregatePartner partnerOperations;
var billingProfile = partnerOperations.Profiles.LegalBusinessProfile.Get();
範例: 主控台測試應用程式。 專案:合作夥伴中心 SDK 範例 類別:GetLegalBusinessProfile.cs
REST 要求
要求的語法
方法 | 要求 URI |
---|---|
GET | {baseURL}/v1/profiles/legalbusiness HTTP/1.1 |
要求標頭
如需詳細資訊,請參閱合作夥伴中心 REST 標頭。
要求本文
無。
要求範例
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 回應
如果成功,這個方法會在回應本文中傳回 LegalBusinessProfile 物件。
回應成功和錯誤碼
每個回應都隨附 HTTP 狀態碼,會指出成功與否以及其他的偵錯資訊。 請使用網路追蹤工具來讀取此錯誤碼、錯誤類型和其他參數。 如需完整清單,請參閱合作夥伴中心的 REST 錯誤碼。
回應範例
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"
}
}