Manage orders - Get customer's subscriptions
按合作伙伴的 Active Directory 租户标识符检索合作伙伴客户的所有订阅。
GET https://api.partnercenter.microsoft.com/v{version}/customers/{customer_id}/subscriptions
GET https://api.partnercenter.microsoft.com/v{version}/customers/{customer_id}/subscriptions?order_id={order_id}&mpn_id={mpn_id}&product_type={product_type}&product_subtype={product_subtype}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
customer_id
|
path | True |
string |
客户的 Active Directory 租户标识符。 |
version
|
path | True |
string |
|
mpn_id
|
query |
string |
合作伙伴标识符(mpn)。 可选参数。 按“合作伙伴 ID”筛选订阅。 此参数不能与“订单 ID”结合使用。 |
|
order_id
|
query |
string |
订单标识符。 可选参数。 按“订单 ID”筛选订阅。 此参数不能与“合作伙伴 ID”结合使用。 |
|
product_subtype
|
query |
string |
产品子类型。 可选参数。 按“product type”和“product subtype”筛选订阅。 |
|
product_type
|
query |
string |
产品类型。 可选参数。 按“产品类型”筛选订阅。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Authorization | True |
string |
授权持有者令牌 |
ms-correlationid |
string |
用于在内部跟踪请求。 如果未提供 ms-correlationid,则服务器将为每个请求生成一个新请求 |
|
ms-cv |
string |
用于在内部跟踪请求。 如果未提供 ms-cv,服务器将为每个请求生成一个新请求 |
|
ms-requestid |
string |
用于请求的幂等性。 如果未提供 ms-requestid,服务器将为每个请求生成一个新请求 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
请求成功。 响应正文包含订阅。 Media Types: "application/json", "text/json" |
|
400 Bad Request |
输入缺失或无效。 响应正文将提供错误详细信息。 Media Types: "application/json", "text/json" |
|
401 Unauthorized |
请求未通过身份验证。 客户端需要首先通过合作伙伴 API 服务进行身份验证。 Media Types: "application/json", "text/json" |
|
403 Forbidden |
请求已经过身份验证,但被拒绝,因为调用方无权调用该请求。 Media Types: "application/json", "text/json" |
|
404 Not Found |
找不到资源或未与给定输入参数一起使用。 Media Types: "application/json", "text/json" |
|
500 Internal Server Error |
合作伙伴 API 服务或其某个依赖项未能满足请求。 调用方可能会重试此操作。 Media Types: "application/json", "text/json" |
定义
Microsoft.Partner.Core.Collections.Link
名称 | 类型 | 说明 |
---|---|---|
body |
string |
|
headers |
System. |
|
method |
string |
|
uri |
string |
Microsoft.Partner.Core.Collections.ResourceAttributes
名称 | 类型 | 说明 |
---|---|---|
etag |
string |
|
objectType |
string |
Microsoft.Partner.Core.Collections.ResourceCollection[Microsoft.Partner.Services.Subscriptions.V1.Models.Subscription]
名称 | 类型 | 说明 |
---|---|---|
attributes | ||
items |
Microsoft. |
|
links | ||
totalCount |
integer |
Microsoft.Partner.Core.Collections.ResourceLinks
名称 | 类型 | 说明 |
---|---|---|
next | ||
previous | ||
self |
Microsoft.Partner.Services.Subscriptions.V1.Models.ItemType
名称 | 类型 | 说明 |
---|---|---|
displayName |
string |
|
id |
string |
|
subType |
Microsoft.Partner.Services.Subscriptions.V1.Models.ProductTerm
名称 | 类型 | 说明 |
---|---|---|
availabilityId |
string |
|
billingCycle |
enum:
|
|
productId |
string |
|
skuId |
string |
|
termDuration |
string |
Microsoft.Partner.Services.Subscriptions.V1.Models.PurchaseCommitment
名称 | 类型 | 说明 |
---|---|---|
amount |
number |
|
currency |
string |
|
grain |
string |
Microsoft.Partner.Services.Subscriptions.V1.Models.RefundableQuantity
名称 | 类型 | 说明 |
---|---|---|
details |
Microsoft. |
|
totalQuantity |
integer |
Microsoft.Partner.Services.Subscriptions.V1.Models.RefundableQuantityDetail
名称 | 类型 | 说明 |
---|---|---|
allowedUntilDateTime |
string |
|
quantity |
integer |
Microsoft.Partner.Services.Subscriptions.V1.Models.RefundOption
名称 | 类型 | 说明 |
---|---|---|
expiresAt |
string |
|
type |
string |
Microsoft.Partner.Services.Subscriptions.V1.Models.ScheduledNextTermInstructions
名称 | 类型 | 说明 |
---|---|---|
customTermEndDate |
string |
|
product |
Microsoft. |
|
quantity |
integer |
Microsoft.Partner.Services.Subscriptions.V1.Models.Scope
名称 | 类型 | 说明 |
---|---|---|
entitlementId |
string |
|
managementGroupId |
string |
|
resourceGroupId |
string |
|
subscriptionId |
string |
|
type |
string |
Microsoft.Partner.Services.Subscriptions.V1.Models.Subscription
名称 | 类型 | 说明 |
---|---|---|
actionTaken |
boolean |
|
actions |
string[] |
|
attentionNeeded |
boolean |
|
attentionReason |
string |
|
attributes | ||
autoRenewEnabled |
boolean |
|
billingCycle |
enum:
|
|
billingType |
enum:
|
|
commitmentEndDate |
string |
|
contractType |
enum:
|
|
creationDate |
string |
|
effectiveStartDate |
string |
|
entitlementId |
string |
|
friendlyName |
string |
|
hasPurchasableAddons |
boolean |
|
id |
string |
|
isMicrosoftProduct |
boolean |
|
isTrial |
boolean |
|
lineItems |
Microsoft. |
|
links |
Microsoft. |
|
migratedFromSubscriptionId |
string |
|
offerId |
string |
|
offerName |
string |
|
orderId |
string |
|
parentSubscriptionId |
string |
|
partnerId |
string |
|
productOrderId |
string |
|
productType | ||
promotionId |
string |
|
publisherName |
string |
|
quantity |
integer |
|
refundOptions |
Microsoft. |
|
refundableQuantity |
Microsoft. |
|
renewalTermDuration |
string |
|
scheduledNextTermInstructions |
Microsoft. |
|
status |
enum:
|
|
suspensionReasons |
string[] |
|
termDuration |
string |
|
unitType |
string |
Microsoft.Partner.Services.Subscriptions.V1.Models.SubscriptionLineItemDetail
名称 | 类型 | 说明 |
---|---|---|
autoRenewEnabled |
boolean |
|
friendlyName |
string |
|
id |
string |
|
purchaseCommitment |
Microsoft. |
|
quantity |
integer |
|
scope | ||
status |
enum:
|
Microsoft.Partner.Services.Subscriptions.V1.Models.SubscriptionLinks
名称 | 类型 | 说明 |
---|---|---|
activationLinks | ||
availability | ||
entitlement | ||
next | ||
offer | ||
parentSubscription | ||
pendingChanges | ||
previous | ||
product | ||
self | ||
sku |
System.Collections.Generic.KeyValuePair[System.String,System.String]
名称 | 类型 | 说明 |
---|---|---|
key |
string |
|
value |
string |