Method: monetization.subscriptions.basePlans.migratePrices
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将订阅者从一个或多个旧价格同类群组迁移到当前价格。此类请求会使 Google Play 通知受影响的订阅者。最多只支持 250 个同时的旧价格同类群组。
HTTP 请求
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:migratePrices
网址采用 gRPC 转码语法。
路径参数
参数 |
packageName |
string
必需。父级应用的软件包名称,必须与 Subscription 资源的 packageName 字段相同。
|
productId |
string
必需。要更新的订阅的 ID。必须与 Subscription 资源的 productId 字段相同。
|
basePlanId |
string
必需。要更新价格的基础方案的唯一基础方案 ID。
|
请求正文
请求正文中包含结构如下的数据:
字段 |
regionalPriceMigrations[] |
object (RegionalPriceMigrationConfig )
必需。要更新的地区价格。
|
regionsVersion |
object (RegionsVersion )
必需。当前用于 regionalPriceMigrations 的可用地区的版本。
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
可选。传播此产品更新的延迟容忍度。默认为对延迟时间敏感。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidpublisher
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eMigrates subscribers of one or more legacy price cohorts to the current subscription price, notifying affected subscribers via Google Play.\u003c/p\u003e\n"],["\u003cp\u003eSupports a maximum of 250 simultaneous legacy price cohorts for migration.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the package name, subscription ID, and base plan ID for the price migration.\u003c/p\u003e\n"],["\u003cp\u003eThe request body specifies regional price updates, the regions version, and an optional latency tolerance for the update.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e authorization scope for access.\u003c/p\u003e\n"]]],["This content describes the process of migrating subscribers from legacy price cohorts to the current price using the Google Play API. This involves sending a `POST` request to a specific endpoint with parameters like `packageName`, `productId`, and `basePlanId`. The request body requires `regionalPriceMigrations` and `regionsVersion`, with an optional `latencyTolerance` parameter. Successful requests result in an empty response, and require `androidpublisher` authorization scope. Google Play notifies the affected subscribers of changes, with a limit of 250 simultaneous legacy cohorts.\n"],null,["# Method: monetization.subscriptions.basePlans.migratePrices\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nMigrates subscribers from one or more legacy price cohorts to the current price. Requests result in Google Play notifying affected subscribers. Only up to 250 simultaneous legacy price cohorts are supported.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:migratePrices`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. Package name of the parent app. Must be equal to the packageName field on the Subscription resource. |\n| `productId` | `string` Required. The ID of the subscription to update. Must be equal to the productId field on the Subscription resource. |\n| `basePlanId` | `string` Required. The unique base plan ID of the base plan to update prices on. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"regionalPriceMigrations\": [ { object (/android-publisher/api-ref/rest/v3/RegionalPriceMigrationConfig) } ], \"regionsVersion\": { object (/android-publisher/api-ref/rest/v3/RegionsVersion) }, \"latencyTolerance\": enum (/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance) } ``` |\n\n| Fields ||\n|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `regionalPriceMigrations[]` | `object (`[RegionalPriceMigrationConfig](/android-publisher/api-ref/rest/v3/RegionalPriceMigrationConfig)`)` Required. The regional prices to update. |\n| `regionsVersion` | `object (`[RegionsVersion](/android-publisher/api-ref/rest/v3/RegionsVersion)`)` Required. The version of the available regions being used for the regionalPriceMigrations. |\n| `latencyTolerance` | `enum (`[ProductUpdateLatencyTolerance](/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance)`)` Optional. The latency tolerance for the propagation of this product update. Defaults to latency-sensitive. |\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]