Method: monetization.subscriptions.basePlans.activate
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک طرح پایه را فعال می کند. پس از فعال شدن، طرح های پایه برای مشترکین جدید در دسترس خواهد بود.
درخواست HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:activate
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
packageName | string مورد نیاز. برنامه والد (نام بسته) طرح پایه فعال می شود. |
productId | string مورد نیاز. اشتراک والدین (ID) طرح پایه فعال می شود. |
basePlanId | string مورد نیاز. شناسه طرح پایه منحصر به فرد طرح پایه برای فعال کردن. |
درخواست بدن
بدنه درخواست حاوی داده هایی با ساختار زیر است:
فیلدها |
---|
latencyTolerance | enum ( ProductUpdateLatencyTolerance ) اختیاری. تحمل تأخیر برای انتشار این بهروزرسانی محصول. به طور پیش فرض حساس به تأخیر است. |
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی نمونه ای از Subscription
است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/androidpublisher
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eActivates a specified base plan, making it available to new subscribers within a parent subscription and app package.\u003c/p\u003e\n"],["\u003cp\u003eRequires a POST request to a specific endpoint, providing the package name, product ID, and base plan ID in the URL path.\u003c/p\u003e\n"],["\u003cp\u003eOptionally accepts a request body to define the latency tolerance for the product update propagation.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful activation, the response returns details of the updated subscription.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This document outlines how to activate a base plan for subscriptions via an HTTP POST request. The request targets a specific application (`packageName`), subscription (`productId`), and base plan (`basePlanId`). The request body can optionally include a `latencyTolerance` field, defaulting to latency-sensitive. Upon success, the response returns a `Subscription` instance. Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope. The URL structure utilizes gRPC Transcoding.\n"],null,["# Method: monetization.subscriptions.basePlans.activate\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\nActivates a base plan. Once activated, base plans will be available to new subscribers.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}:activate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|--------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The parent app (package name) of the base plan to activate. |\n| `productId` | `string` Required. The parent subscription (ID) of the base plan to activate. |\n| `basePlanId` | `string` Required. The unique base plan ID of the base plan to activate. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------|\n| ``` { \"latencyTolerance\": enum (/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance) } ``` |\n\n| Fields ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\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 contains an instance of [Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]