Method: monetization.subscriptions.basePlans.offers.create
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
सदस्यता का नया ऑफ़र बनाता है. सिर्फ़ अपने-आप रिन्यू होने वाले बुनियादी प्लान में, सदस्यता वाले ऑफ़र इस्तेमाल किए जा सकते हैं. ऑफ़र की स्थिति तब तक ड्राफ़्ट रहेगी, जब तक उसे चालू नहीं किया जाता.
एचटीटीपी अनुरोध
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers
यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ के पैरामीटर
पैरामीटर |
packageName |
string
ज़रूरी है. पैरंट ऐप्लिकेशन (पैकेज का नाम) जिसके लिए ऑफ़र बनाया जाना चाहिए. सदस्यता संसाधन पर PackageName फ़ील्ड के बराबर होना चाहिए.
|
productId |
string
ज़रूरी है. वह पैरंट सदस्यता (आईडी) जिसके लिए ऑफ़र बनाना है. SubscriptionOffer संसाधन में मौजूद productId फ़ील्ड के बराबर होना चाहिए.
|
basePlanId |
string
ज़रूरी है. पैरंट प्लान (आईडी), जिसके लिए ऑफ़र बनाया जाना चाहिए. SubscriptionOffer संसाधन में, basePlanId फ़ील्ड के बराबर होना चाहिए.
|
क्वेरी पैरामीटर
पैरामीटर |
offerId |
string
ज़रूरी है. ऑफ़र के लिए इस्तेमाल किया जाने वाला आईडी. इस फ़ॉर्मैट की ज़रूरी शर्तों के बारे में जानने के लिए, SubscriptionOffer संसाधन पर OfferId फ़ील्ड का दस्तावेज़ देखें.
|
regionsVersion |
object (RegionsVersion )
ज़रूरी है. सदस्यता के ऑफ़र के लिए इस्तेमाल किए जा रहे देशों/इलाकों का वर्शन.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में SubscriptionOffer
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब होने पर, रिस्पॉन्स के मुख्य हिस्से में SubscriptionOffer
का नया इंस्टेंस शामिल किया जाता है.
अनुमति देने के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/androidpublisher
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eCreates a new subscription offer for auto-renewing base plans, initially in DRAFT state until activated.\u003c/p\u003e\n"],["\u003cp\u003eUses an HTTP POST request to \u003ccode\u003ehttps://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers\u003c/code\u003e with specified path and query parameters.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing a \u003ccode\u003eSubscriptionOffer\u003c/code\u003e object in the request body, detailing the offer's specifics.\u003c/p\u003e\n"],["\u003cp\u003eUpon success, the response body returns the newly created \u003ccode\u003eSubscriptionOffer\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This document details how to create a new subscription offer for auto-renewing base plans. The `POST` request is sent to a specific URL with `packageName`, `productId`, and `basePlanId` as required path parameters. The `offerId` and `regionsVersion` are required query parameters. The request body must contain `SubscriptionOffer` data, and a successful response returns the newly created `SubscriptionOffer`. Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope.\n"],null,["# Method: monetization.subscriptions.basePlans.offers.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a new subscription offer. Only auto-renewing base plans can have subscription offers. The offer state will be DRAFT until it is activated.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers`\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) for which the offer should be created. Must be equal to the packageName field on the Subscription resource. |\n| `productId` | `string` Required. The parent subscription (ID) for which the offer should be created. Must be equal to the productId field on the SubscriptionOffer resource. |\n| `basePlanId` | `string` Required. The parent base plan (ID) for which the offer should be created. Must be equal to the basePlanId field on the SubscriptionOffer resource. |\n\n### Query parameters\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `offerId` | `string` Required. The ID to use for the offer. For the requirements on this format, see the documentation of the offerId field on the SubscriptionOffer resource. |\n| `regionsVersion` | `object (`[RegionsVersion](/android-publisher/api-ref/rest/v3/RegionsVersion)`)` Required. The version of the available regions being used for the subscriptionOffer. |\n\n### Request body\n\nThe request body contains an instance of [SubscriptionOffer](/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers#SubscriptionOffer).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [SubscriptionOffer](/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers#SubscriptionOffer).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]