获取客户) 的产品 (SKU 列表
适用于:合作伙伴中心|由世纪互联运营的合作伙伴中心|Microsoft Cloud for US Government合作伙伴中心
获取现有客户可用的特定产品的 SKU 集合。
必备条件
合作伙伴中心身份验证中所述的凭据。 此方案支持使用独立应用和 App+用户凭据进行身份验证。
客户 ID (
customer-tenant-id)。 如果不知道客户的 ID,则可以在合作伙伴中心仪表板中查找它。 从“合作伙伴中心”菜单中选择“CSP” ,然后选择“客户” 。 从客户列表中选择客户,然后选择“帐户” 。 在客户的“帐户”页上的“客户帐户信息” 部分查找 Microsoft ID。 Microsoft ID 与客户 ID (customer-tenant-id) 相同。产品 ID (product-id) 。
REST 请求
请求语法
| 方法 | 请求 URI |
|---|---|
| POST | {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus HTTP/1.1 |
请求 URI 参数
| 名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
| customer-tenant-id | GUID | 是 | 该值是 GUID 格式的 customer-tenant-id,是一个用于指定客户的标识符。 |
| product-id | 字符串 | 是 | 标识产品的字符串。 |
请求标头
有关详细信息,请参阅合作伙伴中心 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: b1939cb2-e83d-4fb0-989f-514fb741b734
REST 响应
响应的成功和错误代码
每个响应都带有一个 HTTP 状态代码,用于指示成功或失败以及其他调试信息。 请使用网络跟踪工具来读取此代码、错误类型和其他参数。 有关完整列表,请参阅 合作伙伴中心错误代码。
此方法返回以下错误代码:
| HTTP 状态代码 | 错误代码 | 说明 |
|---|---|---|
| 404 | 400013 | 找不到父产品。 |
Azure 计划的响应示例
HTTP/1.1 200 OK
Content-Length: 1909
Content-Type: application/json; charset=utf-8
MS-CorrelationId: cad955c2-8efc-47fe-b112-548ff002ba18
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: e75c1060-852e-4b49-92b0-cd15167a0d51,e75c1060-852e-4b49-92b0-cd15167a0d51
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"
}
}