取得產品 SKU 列表(客戶)
適用於:合作夥伴中心 |由 21Vianet 營運的合作夥伴中心 |美國政府Microsoft雲端合作夥伴中心
取得現有客戶可使用之特定產品的 SKU 集合。
必要條件
認證,如合作夥伴中心驗證所述。 此案例支援使用獨立應用程式和 App+使用者認證進行驗證。
客戶識別碼 (
customer-tenant-id
)。 如果您不知道客戶的標識碼,您可以在合作夥伴中心中選取 [客戶] 工作區,然後從客戶清單中查看客戶,然後從 [帳戶]。 在客戶的 [帳戶] 頁面上,尋找 [客戶帳戶資訊] 區段中的 [Microsoft 識別碼]。 Microsoft 識別碼與客戶識別碼 (customer-tenant-id
) 相同。產品標識碼(product-id)。
REST 要求
要求語法
方法 | 要求 URI |
---|---|
POST | {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus HTTP/1.1 |
要求 URI 參數
名稱 | 類型 | 必要 | 描述 |
---|---|---|---|
customer-tenant-id | GUID | Yes | 此值是 GUID 格式的 customer-tenant-id,此識別碼可讓您用來指定客戶。 |
product-id | 字串 | Yes | 識別產品的字串。 |
要求標頭
如需詳細資訊,請參閱合作夥伴中心 REST 標頭。
要求本文
無。
要求範例
GET https://api.partnercenter.microsoft.com/v1/customers/65543400-f8b0-4783-8530-6d35ab8c6801/products/DZH318Z0BPS6 HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 83643f5e-5dfd-4375-88ed-054412460dc8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
REST 回應
回應成功和錯誤碼
每個回應都隨附 HTTP 狀態碼,會指出成功與否以及其他的偵錯資訊。 請使用網路追蹤工具來讀取此錯誤碼、錯誤類型和其他參數。 如需完整清單,請參閱 合作夥伴中心錯誤碼。
此方法會傳回下列錯誤碼:
HTTP 狀態碼 | 錯誤碼 | 描述 |
---|---|---|
404 | 400013 | 找不到父產品。 |
Azure 方案的回應範例
HTTP/1.1 200 OK
Content-Length: 1909
Content-Type: application/json; charset=utf-8
MS-CorrelationId: bbbb1111-cc22-3333-44dd-555555eeeeee
MS-RequestId: ae7288e2-2673-4ad4-8c12-7aad818d5949
{
"id": "DZH318Z0BPS6",
"title": "Microsoft Azure plan",
"description": "Gain access to Azure Services.",
"productType": {
"id": "Azure",
"displayName": "Azure",
"subType": {
"id": "Azure",
"displayName": "Azure"
}
},
"isMicrosoftProduct": true,
"publisherName": "Microsoft Corporation",
"links": {
"skus": {
"uri": "/products/DZH318Z0BPS6/skus?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/DZH318Z0BPS6?country=US",
"method": "GET",
"headers": []
}
},
"localizedAttributes": [
{
"key": "OfferType",
"value": "OfferType"
},
{
"key": "Standard",
"value": "Standard"
},
{
"key": "DevTest",
"value": "Dev/Test"
}
]
}
新商務授權型服務的回應範例
注意
授權型服務的新商務體驗包含許多新功能,可供所有 雲端解決方案提供者 (CSP) 使用。 如需詳細資訊,請參閱 新的商務體驗概觀。
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
MS-CorrelationId: cccc2222-dd33-4444-55ee-666666ffffff,cccc2222-dd33-4444-55ee-666666ffffff
MS-RequestId: 18b41adf-29b5-48eb-b14f-c9683a4e5b7d,18b41adf-29b5-48eb-b14f-c9683a4e5b7d
X-Locale: en-US,en-US
X-SourceFiles: =?UTF-8?B?QzpcVXNlcnNcbWFtZW5kZVxkZXZcZHBzLXJwZVxSUEUuUGFydG5lci5TZXJ2aWNlLkNhdGFsb2dcV2ViQXBpc1xDYXRhbG9nU2VydmljZS5WMi5XZWJcdjFccHJvZHVjdHNcRFpIMzE4WjBCUTVTXHNrdXM=?=
X-Powered-By: ASP.NET
Date: Thu, 15 Mar 2018 21:06:03 GMT
Content-Length: 50917
{
"totalCount": 40,
"items": [
{
{
"id": "0001",
"productId": "CFQ7TTC0LH18",
"title": "Microsoft 365 Business Basic",
"description": "Best for businesses that need professional email, cloud file storage, and online meetings & chat. Desktop versions of Office apps like Excel, Word, and PowerPoint not included. For businesses with up to 300 employees.",
"minimumQuantity": 1,
"maximumQuantity": 300,
"isTrial": false,
"supportedBillingCycles": [
"annual",
"monthly"
],
"purchasePrerequisites": [
"MicrosoftCloudAgreement"
],
"inventoryVariables": [],
"provisioningVariables": [],
"actions": [
"Refund"
],
"dynamicAttributes": {
"isMicrosoftProduct": true,
"hasConstraints": true,
"isAddon": false,
"prerequisiteSkus": [],
"isSoftwareAssuranceApplicable": false,
"upgradeTargetOffers": [
"CFQ7TTC0LDPB:0001",
"CFQ7TTC0LF8Q:0001"
…
],
"provisioningId": "3b555118-da6a-4418-894f-7df1e2096870",
"internal": false
},
"links": {
"availabilities": {
"uri": "/products/CFQ7TTC0LH18/skus/0001/availabilities?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/products/CFQ7TTC0LH18/skus/0001?country=US",
"method": "GET",
"headers": []
}
}
} [...]
],
"links": {
"self": {
"uri": "/products/DZH318Z0BQ5S/skus?country=US",
"method": "GET",
"headers": []
}
},
"attributes": {
"objectType": "Collection"
}
}