Manage orders - Get subscription by ID

按合作伙伴的 Active Directory 租户标识符按标识符检索客户的订阅。

GET https://api.partnercenter.microsoft.com/v{version}/customers/{customer_id}/subscriptions/{subscription_id}

URI 参数

名称 必需 类型 说明
customer_id
path True

string

客户的 Active Directory 租户标识符。

subscription_id
path True

string

订阅标识符。

version
path True

string

请求头

名称 必需 类型 说明
Authorization True

string

授权持有者令牌

ms-correlationid

string

用于在内部跟踪请求。 如果未提供 ms-correlationid,则服务器将为每个请求生成一个新请求

ms-cv

string

用于在内部跟踪请求。 如果未提供 ms-cv,则服务器将为每个请求生成一个新请求

ms-requestid

string

用于请求的幂等性。 如果未提供 ms-requestid,则服务器将为每个请求生成一个新请求

响应

名称 类型 说明
200 OK

Microsoft.Partner.Services.Subscriptions.V1.Models.Subscription

请求已成功。 响应正文包含订阅信息。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

400 Bad Request

输入缺失或无效。 响应正文将提供错误详细信息。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

401 Unauthorized

请求未通过身份验证。 客户端需要先向合作伙伴 API 服务进行身份验证。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

403 Forbidden

请求已经过身份验证,但被拒绝,因为调用方无权调用它。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

404 Not Found

找不到资源,或者对于给定的输入参数不可用。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

500 Internal Server Error

合作伙伴 API 服务或其依赖项之一无法满足请求。 调用方可以重试此操作。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

定义

名称 说明
Microsoft.Partner.Core.Collections.Link
Microsoft.Partner.Core.Collections.ResourceAttributes
Microsoft.Partner.Services.Subscriptions.V1.Models.ItemType
Microsoft.Partner.Services.Subscriptions.V1.Models.ProductTerm
Microsoft.Partner.Services.Subscriptions.V1.Models.PurchaseCommitment
Microsoft.Partner.Services.Subscriptions.V1.Models.RefundableQuantity
Microsoft.Partner.Services.Subscriptions.V1.Models.RefundableQuantityDetail
Microsoft.Partner.Services.Subscriptions.V1.Models.RefundOption
Microsoft.Partner.Services.Subscriptions.V1.Models.ScheduledNextTermInstructions
Microsoft.Partner.Services.Subscriptions.V1.Models.Scope
Microsoft.Partner.Services.Subscriptions.V1.Models.Subscription
Microsoft.Partner.Services.Subscriptions.V1.Models.SubscriptionLineItemDetail
Microsoft.Partner.Services.Subscriptions.V1.Models.SubscriptionLinks
System.Collections.Generic.KeyValuePair[System.String,System.String]
名称 类型 说明
body

string

headers

System.Collections.Generic.KeyValuePair[System.String,System.String][]

method

string

uri

string

Microsoft.Partner.Core.Collections.ResourceAttributes

名称 类型 说明
etag

string

objectType

string

Microsoft.Partner.Services.Subscriptions.V1.Models.ItemType

名称 类型 说明
displayName

string

id

string

subType

Microsoft.Partner.Services.Subscriptions.V1.Models.ItemType

Microsoft.Partner.Services.Subscriptions.V1.Models.ProductTerm

名称 类型 说明
availabilityId

string

billingCycle enum:
  • annual
  • biennial
  • monthly
  • none
  • one_time
  • triennial
  • unknown
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.Partner.Services.Subscriptions.V1.Models.RefundableQuantityDetail[]

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.Partner.Services.Subscriptions.V1.Models.ProductTerm

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

Microsoft.Partner.Core.Collections.ResourceAttributes

autoRenewEnabled

boolean

billingCycle enum:
  • annual
  • monthly
  • none
  • one_time
  • triennial
  • unknown
billingType enum:
  • benefit
  • license
  • none
  • usage
commitmentEndDate

string

contractType enum:
  • product_key
  • redemption_code
  • subscription
creationDate

string

effectiveStartDate

string

entitlementId

string

friendlyName

string

hasPurchasableAddons

boolean

id

string

isMicrosoftProduct

boolean

isTrial

boolean

lineItems

Microsoft.Partner.Services.Subscriptions.V1.Models.SubscriptionLineItemDetail[]

links

Microsoft.Partner.Services.Subscriptions.V1.Models.SubscriptionLinks

migratedFromSubscriptionId

string

offerId

string

offerName

string

orderId

string

parentSubscriptionId

string

partnerId

string

productOrderId

string

productType

Microsoft.Partner.Services.Subscriptions.V1.Models.ItemType

promotionId

string

publisherName

string

quantity

integer

refundOptions

Microsoft.Partner.Services.Subscriptions.V1.Models.RefundOption[]

refundableQuantity

Microsoft.Partner.Services.Subscriptions.V1.Models.RefundableQuantity

renewalTermDuration

string

scheduledNextTermInstructions

Microsoft.Partner.Services.Subscriptions.V1.Models.ScheduledNextTermInstructions

status enum:
  • active
  • deleted
  • disabled
  • expired
  • none
  • pending
  • suspended
suspensionReasons

string[]

termDuration

string

unitType

string

Microsoft.Partner.Services.Subscriptions.V1.Models.SubscriptionLineItemDetail

名称 类型 说明
autoRenewEnabled

boolean

friendlyName

string

id

string

purchaseCommitment

Microsoft.Partner.Services.Subscriptions.V1.Models.PurchaseCommitment

quantity

integer

scope

Microsoft.Partner.Services.Subscriptions.V1.Models.Scope

status enum:
  • active
  • deleted
  • expired
  • expired
  • none
  • pending
  • suspended
名称 类型 说明
activationLinks

Microsoft.Partner.Core.Collections.Link

availability

Microsoft.Partner.Core.Collections.Link

entitlement

Microsoft.Partner.Core.Collections.Link

next

Microsoft.Partner.Core.Collections.Link

offer

Microsoft.Partner.Core.Collections.Link

parentSubscription

Microsoft.Partner.Core.Collections.Link

pendingChanges

Microsoft.Partner.Core.Collections.Link

previous

Microsoft.Partner.Core.Collections.Link

product

Microsoft.Partner.Core.Collections.Link

self

Microsoft.Partner.Core.Collections.Link

sku

Microsoft.Partner.Core.Collections.Link

System.Collections.Generic.KeyValuePair[System.String,System.String]

名称 类型 说明
key

string

value

string