.NET SDK 发行说明
以下发行说明适用于新版本的 Microsoft 合作伙伴中心 .NET SDK。 可以在 GitHub 上找到 .NET SDK 示例 。 可以在 .NET API 浏览器中找到 合作伙伴中心 .NET API 参考 。
重要
截至 2023 年 6 月,最新的合作伙伴中心 .NET SDK 版本 3.4.0 现已存档。 可以从 GitHub 下载 SDK 版本,以及包含有用信息的自述文件。
建议合作伙伴继续使用合作伙伴中心 REST API。
版本 3.4.0
Microsoft 合作伙伴中心 .NET SDK v3.4.0 现已推出。 还提供了已更新的 GitHub 示例。
此版本中包含以下更改:
交易和管理
更新以下 API 以提供术语结束日期时间属性:
Pricing object
现在位于以下 API 响应中:
促销
公开约束:
版本 3.3.0
Microsoft 合作伙伴中心 .NET SDK v3.3.0 现已推出。 还提供了已更新的 GitHub 示例。
此版本中包含以下更改:
交易和管理
如果客户遭到入侵(欺诈),将更新以下 API 以启用 Azure 订阅取消:
- Azure 计划 - 管理订阅和资源
- 取消 Azure 订阅 - 合作伙伴中心应用开发人员
- Azure 支出 - 取消 Azure 权利 - REST API(合作伙伴中心 Rest)
- 获取订阅的 Azure 权利 - 合作伙伴中心应用开发人员
- Azure 支出 - 获取订阅的 Azure 权利 - REST API(合作伙伴中心 Rest)
“OperationId”现在存在于以下 API 响应中:
新的 GDAP 错误消息:
审核
添加了新的资源类型“AzureEntitlement”和“IndirectProviderIndirectResellerDap”,如下所示:
版本 3.2.0
Microsoft 合作伙伴中心 .NET SDK v3.2.0 现已正式发布。 还提供了已更新的 GitHub 示例。
此版本中包含以下更改:
若要使用 .NET SDK v 3.2.0,合作伙伴需要拥有 Newtonsoft.Json 13.0.1 及更高版本。 由于 v13.0.1 之前的版本存在高漏洞。
新的 API 协定
引入了以下 API 以支持 NCE 迁移计划:
汇报 API 协定
资格 API - 更新了具有三个新字段的公共合同:“EducationSegment”、“网站”、“验证码” 更新客户的资格
验证状态 -“lastUpdateDatetime”已从 DateTime 更改为客户的字符串 检索验证状态
自助服务策略 - 权限对象 下资源支持的新值“AzureSavingsPlan”创建自助服务策略
迁移 - 引入了“customTermEndDate”字段 ,创建新的商业迁移
订阅资源 -新的“BillingCycleEndDate”属性添加了 订阅资源
添加了新的错误类型“NoPromotionsAvailableEligibilityError”,并向“SeatCountPromotionEligibilityError” 添加了“AvailableSeats”属性,验证提升资格
版本 3.1.2
Microsoft 合作伙伴中心 .NET SDK v3.1.2 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
公共合同汇报
向AddOnMigrations
对象添加了字段NewCommerceEligibility
验证要迁移的订阅
版本 3.1.1
重要
版本 3.1.0 已弃用。 请勿下载 .NET SDK v.3.1.0
Microsoft 合作伙伴中心 .NET SDK v3.1.1 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
交易和管理
公共合同中的新字段
将促销 ID 添加到计划更改
管理新商务订阅的计划更改
Patch {baseURL}/v1/customers/{customer-tenant-id}/subscriptions/{subscription-id}
对订阅状态值“disabled”的新 SDK 支持。
合作伙伴中心 API 将从 v3.1.1 SDK 版本 90 天后开始返回新的“已禁用”状态。 合作伙伴在 API 返回“已禁用”状态之前有 90 天的时间为合作伙伴提供更新 SDK 并遵守变更管理原则的时间。
新 API 汇报
查询迁移的订阅 是 API,合作伙伴可在其中查询所有已迁移的子项以获取给定的输入条件。
GET {baseURL}/v1/migrations/newcommerce
获取新的商务迁移事件 API 用于基于当前订阅 ID 或迁移 ID 提取迁移事件的详细信息。
GET {baseURL}/v1/customers/{customer-tenant-id}/migrations/newcommerce/events
版本 3.0.1
Microsoft 合作伙伴中心 .NET SDK v3.0.1 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
交易和管理
公共合同中的新字段
POST {baseURL}/v1/customers/{customer_id}/subscriptions/{subscription_id}/transition
GET {baseUrl}/v1/customers/{customer_id}/subscriptions/{subscription_id}/transitions
GET/PATCH {baseUrl}/v1/customers/{customer_id}/subscriptions/{subscription_id}
- 向模型添加了
RefundableQuantity
属性Subscription
- 向模型添加了
CustomTermEndDate
属性ScheduledNextTermInstructions
- 向模型添加了
MigratedFromSubscriptionId
属性Subscription
- 向模型添加了
POST {baseUrl}/v1/customers/{customer_tenant_id}/migrations/newcommerce/validate
- 向模型添加了
AddOnMigrations
属性NewCommerceMigration
- 向模型添加了
POST {baseUrl}/v1/customers/{customer_tenant_id}/migrations/newcommerce
- 向模型添加了
AddOnMigrations
属性NewCommerceMigration
- 向模型添加了
GET {baseUrl}/v1/customers/{customer_tenant_id}/migrations/newcommerce/{migration_id}
- 向模型添加了
AddOnMigrations
属性NewCommerceMigration
- 向模型添加了
POST {baseURL}/v1/customers/{customer_id}/carts
- 添加了新的
CartErrorCode
枚举值 - 向
CartError
模型添加了新AdditionalInformation
模型 - 向模型添加了
CustomTermEndDate
属性CartLineItem
- 添加了新的
GET/PUT {baseURL}/v1/customers/{customer_id}/carts/{cart_id}
- 添加了新的
CartErrorCode
枚举值 - 向
CartError
模型添加了新AdditionalInformation
模型 - 向模型添加了
CustomTermEndDate
属性CartLineItem
- 添加了新的
GET/POST {baseURL}/v1/customers/{customer_id}/orders
- 向模型添加了
CustomTermEndDate
属性OrderLineItem
- 向模型添加了
GET/PATCH {baseURL}/v1/customers/{customer_id}/orders/{order_id}
- 向模型添加了
CustomTermEndDate
属性OrderLineItem
- 向模型添加了
NCE 批处理迁移工具
为了促进合作伙伴高效迁移大量订阅的需求,我们启用了批处理迁移(BAM)工具。 BAM 工具允许合作伙伴使用以下方法将订阅迁移到 NCE:
- 简化开放源代码 .NET SDK 示例应用体验
- 使用 Excel 管理迁移编辑
- 支持批量高质量、可重复和可自定义的迁移方案的简单工具
有关详细说明,请参阅新的商务体验批处理迁移工具(BAM)。
安全性
新 API
- 修补 {baseURL}/v1/customers/{customer-tenant-id}
- 删除 DAP API – 删除 DAP 将
AllowDelegatedAccess
属性设置为 false
- 删除 DAP API – 删除 DAP 将
审核和 Webhook
审核更新 - 为“管理超额”、“DAP 管理员 Microsoft 终止的关系”和“检测到 Azure 欺诈事件”添加了新的操作类型。
版本 3.0.0
Microsoft 合作伙伴中心 .NET SDK v3.0.0 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
常见更新
将 System.ComponentModel.Annotations 升级到最新的 5.0 版本,以解决现有的兼容性问题。
交易和管理
新 API
POST {baseUrl}/v1/customers/{customer_tenant_id}/migrations/newcommerce/validate
POST {baseUrl}/v1/customers/{customer_tenant_id}/migrations/newcommerce
GET {baseUrl}/v1/customers/{customer_tenant_id}/migrations/newcommerce/{migration-id}
GET {baseURL}/customers/{customerId}/subscriptions/overage
公共合同中的新字段
PATCH {baseURL}/v1/customers/{customer_id}/subscriptions/{subscription_id}
POST {baseURL}/v1/customers/{customer_id}/subscriptions/{subscription_id}/transition
GET {baseUrl}/v1/customers/{customer_id}/subscriptions/{subscription_id}/transitions
POST/PUT {baseURL}/v1/customers/{customer-tenant-id}/cart
POST {baseURL}/v1/customers/{customer-tenant-id}/orders
PUT {baseURL}/v1/customers/{customer-id}/carts/{cart-id}
Catalog/Price/Promotion
新 API
POST {baseURL}/v1/customers/{customerId}/promotionEligibilities
GET {baseURL}/v1/productpromotions/{promotion-id}?country={country-code}
GET {baseURL}/v1/productpromotions?country={country-code}&segment={segment}
公共合同中的新字段
GET {baseURL}/v1/offers/{offer-id}?country={country-code}
GET {baseURL}/v1/products/{product-id}/skus?country={country-code}&targetSegment={target-segment}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}?country={country-code}
GET {baseURL}/v1/products?country={country}&targetView={targetView}&targetSegment={targetSegment}
POST {baseURL}/v1/customers/{customer-tenant-id}/products?targetView={targetView}
GET {baseURL}/v1/products/{product-id}?country={country}
POST {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus
GET {baseURL}/v1/products/{product-id}/skus?country={country-code}&targetSegment={target-segment}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}?country={country-code}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}/availabilities?country={country-code}&targetSegment={target-segment}
POST {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus/{sku-id}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}/availabilities/{availability-id}?country={country-code}
客户
新 API
GET {baseURL}/v1/customers/{customer-id}/validationStatus?type=account
审核和 Webhook
审核更新 - 为添加 SoftwareAttestation 和添加设备和策略汇报添加了新的操作类型
审核资源 - 合作伙伴中心应用开发者 | Microsoft Docs
GET {baseURL}/v1/products/{product-id}/skus?country={country-code}&targetSegment={target-segment}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}?country={country-code}
GET {baseURL}/v1/products?country={country}&targetView={targetView}&targetSegment={targetSegment}
POST {baseURL}/v1/customers/{customer-tenant-id}/products?targetView={targetView}
GET {baseURL}/v1/products/{product-id}?country={country}
POST {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus
GET {baseURL}/v1/products/{product-id}/skus?country={country-code}&targetSegment={target-segment}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}?country={country-code}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}/availabilities?country={country-code}&targetSegment={target-segment}
POST {baseURL}/v1/customers/{customer-tenant-id}/products/{product-id}/skus/{sku-id}
GET {baseURL}/v1/products/{product-id}/skus/{sku-id}/availabilities/{availability-id}?country={country-code}
PUT {baseURL}/customers/{customerId}/subscriptions/overage
GET {baseURL}/customers/{customerId}/subscriptions/overage
版本 2.0.1
Microsoft 合作伙伴中心 .NET SDK v2.0.1 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
注意
作为新商务体验(“NCE”)的一部分引入的一些更改,这些更改目前仅根据邀请提供给属于 Microsoft 365/Microsoft Dynamics 365 新商务体验技术预览版的合作伙伴。 不属于新商业个人预览版的合作伙伴不应注意到影响,并且应向后兼容。
常见
对身份验证库的引用进行更改 - 引用从 Azure Active Directory 身份验证库 (ADAL) 更改为 Microsoft 身份验证库 (MSAL)
应进行以下更改,以确保 MSAL 在应用程序或 .NET 示例中正确运行:
添加
https://login.microsoftonline.com/common/oauth2/nativeclient
为 Mobile 和桌面应用程序的 RedirectUrl将域添加到应用程序配置文件中的 UserAuthentication 部分。
域是在其中创建 Azure AD 应用程序的 Azure Active Directory 域或租户 ID
错误代码 – 添加了新的错误代码
- 408:请求超时
- 504:网关超时
管理账单
发票行项 - 添加到以下 API 的新属性:
GET /invoices/{invoice-id}/lineitems?provider={provider}&invoicelineitemtype=billinglineitems
GET /invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=billinglineitems
新属性:
- ProductQualifiers
- subscriptionStartDate
- subscriptionEndDate
- referenceId
- creditReasonCode (仅适用于 NCE)
- promotionId
每日分级使用情况行项 – 添加到以下 API 的新属性:
GET /invoices/{invoice-id}/lineitems?provider=onetime&invoicelineitemtype=usagelineitems
新属性:
- hasPartnerEarnedCredit (仅适用于 NCE)
- creditType (仅适用于 NCE)
- rateOfCredit (仅适用于 NCE)
管理订单
订阅资源 - 添加了新属性。
- CancellationAllowedUntilDate - (仅适用于 NCE)
转换资源 (仅适用于 NCE) - 添加了新属性
- FromSubscriptionId
管理客户帐户
验证地址 – 响应已从布尔值更改为 API 的新模型:
POST /validations/address
新的响应模型:
- AddressValidationResponse
客户资格同步 API 已弃用。
版本 1.17.0
Microsoft 合作伙伴中心 .NET SDK v1.17.0 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
审核更新 - 添加了新的操作类型,用于了解客户何时批准和终止 DAP
审核更新 - 添加了支持客户目录角色方案的新资源和操作类型
- 资源类型“CustomerDirectoryRole”
- 操作类型“AddUserMember”和“RemoveUserMember”
SDK 汇报客户帐户 - 支持以下 API
- GET /customers/{customer-tenant-id}/directSignedMicrosoftCustomerAgreementStatus
- GET /customers/{customer-tenant-id}/qualifications
- POST /customers/{customer_id}/qualifications?code={validationCode}
在作为新商务的一部分引入的更改之后,新商务目前仅根据邀请提供给属于 Microsoft 365/Microsoft Dynamics 365 新商务体验技术预览版的合作伙伴。 不属于新商业个人预览版的合作伙伴不应注意到影响,并且应向后兼容。
- 目录更改:
- GET /products/{product-id}/skus/{sku-id}
- 购买和管理:
- GET /customers/{customerId}/subscriptions
- GET /customers/{customerId}/subscriptions/{subscriptionId}
- PATCH /customers/{customerId}/subscriptions/{subscriptionId}
- GET /customers/{customerId}/subscriptions/{subscriptionId}/transitioneligibilities
- GET /customers/{customerId}/subscriptions/{subscriptionId}/transitions
- POST /customers/{customerId}/subscriptions/{subscriptionId}/transitions
- 目录更改:
版本 1.16.3
Microsoft 合作伙伴中心 .NET SDK v1.16.3 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
SelfServePolicies - 添加了新增功能
客户公司档案
CustomerBillingProfile.DefaultAddress
- 添加了 MiddleName
版本 1.16.2
Microsoft 合作伙伴中心 .NET SDK v1.16.2 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
更新了审核记录支持的操作类型。 新添加的包括:
- CreateSelfServePolicy
- UpdateSelfServePolicy
- DeleteSelfServePolicy
- RemovePartnerRelationship
- DeleteTipCustomer
- CreateRelatedReferral
- UpdateRelatedReferral
现已弃用服务请求创建功能
现已弃用支持主题
版本 1.16.1
Microsoft 合作伙伴中心 .NET SDK v1.16.1 现已正式发布。 还提供了已更新的 GitHub 示例。 此版本中包含以下更改:
我们已将现有的 Microsoft 合作伙伴中心 SDK 从 .NET Framework 迁移到 .NET Standard 2.0 平台。 此迁移将使 SDK 与使用 .NET Framework 4.6.1 及更高版本的现有应用程序兼容。 SDK 支持 .NET Core 2.0 及更高版本。 在将其移植到现有应用程序之前,请检查 .NET 实现支持 。
版本 1.15.3
Microsoft 合作伙伴中心 .NET SDK v1.15.3 现已正式发布。 还可以使用更新的 REST API 和 GitHub 示例 。 此版本中包含以下更改:
- 合作伙伴协议
- 添加了间接提供商验证间接经销商Microsoft 合作伙伴协议状态的功能。
- Products
- 以下两个接口错误地放置在 Microsoft.Store.PartnerCenter.Products 命名空间下。 现在,它们位于 Microsoft.Store.PartnerCenter.Customers.Products 命名空间下。
- ICustomerProductByReservationScope
- ICustomerSkuByReservationScope
- 以下两个接口错误地放置在 Microsoft.Store.PartnerCenter.Products 命名空间下。 现在,它们位于 Microsoft.Store.PartnerCenter.Customers.Products 命名空间下。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈