Method: inappproducts.insert
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
יצירת מוצר מתוך האפליקציה (מוצר מנוהל או מינוי).
אין יותר להשתמש בשיטה הזו כדי ליצור מינויים. מידע נוסף זמין במאמר הזה.
בקשת HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts
בכתובת ה-URL נעשה שימוש בתחביר המרת gRPC.
פרמטרים של נתיב
פרמטרים |
packageName |
string
שם החבילה של האפליקציה.
|
פרמטרים של שאילתה
פרמטרים |
autoConvertMissingPrices |
boolean
אם הערך הוא true, המחירים בכל האזורים שאפליקציית ההורה מטורגטת אליהם, שלא צוין עבורם מחיר למוצר הזה מתוך האפליקציה, יומרו באופן אוטומטי למטבע היעד על סמך מחיר ברירת המחדל. ברירת המחדל היא False.
|
גוף הבקשה
גוף הבקשה מכיל מופע של InAppProduct
.
גוף התגובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע חדש של InAppProduct
שנוצר.
היקפי הרשאות
נדרש היקף OAuth הבא:
https://www.googleapis.com/auth/androidpublisher
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eCreates an in-app product, such as a managed product or a subscription, within a specified app.\u003c/p\u003e\n"],["\u003cp\u003eThis method is deprecated for subscription creation; refer to the provided article for alternative approaches.\u003c/p\u003e\n"],["\u003cp\u003eThe request utilizes an HTTP POST to a structured URL including the package name and optional query parameters for price conversion.\u003c/p\u003e\n"],["\u003cp\u003eRequest and response bodies utilize the \u003ccode\u003eInAppProduct\u003c/code\u003e object for data transfer.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This document details the process of creating an in-app product using the Android Publisher API. A `POST` request is sent to a specific URL containing the app's package name. The request body includes `InAppProduct` data. The request can include a boolean query parameter, `autoConvertMissingPrices`, to manage regional pricing. The response, upon success, returns the newly created `InAppProduct`. Authorization requires the `androidpublisher` OAuth scope. This method is deprecated for subscriptions.\n"],null,["# Method: inappproducts.insert\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 an in-app product (a managed product or a subscription).\n\nThis method should no longer be used to create subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|-----------------------------------|\n| `packageName` | `string` Package name of the app. |\n\n### Query parameters\n\n| Parameters ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `autoConvertMissingPrices` | `boolean` If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. |\n\n### Request body\n\nThe request body contains an instance of [InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]