Method: inappproducts.update
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Aktualisiert ein In-App-Produkt (ein verwaltetes Produkt oder ein Abo).
Diese Methode sollte nicht mehr zum Aktualisieren von Abos verwendet werden. Weitere Informationen finden Sie in diesem Artikel.
HTTP-Anfrage
PUT https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
packageName |
string
Paketname der App.
|
sku |
string
Eindeutige Kennung für das In-App-Produkt.
|
Abfrageparameter
Parameter |
autoConvertMissingPrices |
boolean
Bei „true“ werden die Preise für alle Regionen, auf die die übergeordnete App ausgerichtet ist, ohne dass für dieses In-App-Produkt ein Preis angegeben ist, automatisch auf Grundlage des Standardpreises in die Zielwährung umgerechnet. Die Standardeinstellung ist "false".
|
allowMissing |
boolean
Wenn die Richtlinie auf „true“ gesetzt ist und das In-App-Produkt mit dem angegebenen „packageName“ und der Artikelnummer nicht vorhanden ist, wird das In-App-Produkt erstellt.
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
Optional. Die Latenztoleranz für die Weitergabe dieses Produktupdates. Die Standardeinstellung ist latenzempfindlich.
|
Anfragetext
Der Anfragetext enthält eine Instanz von InAppProduct
.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von InAppProduct
.
Autorisierungsbereiche
Erfordert den folgenden OAuth-Bereich:
https://www.googleapis.com/auth/androidpublisher
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003eUpdates an existing in-app product or subscription using a PUT request.\u003c/p\u003e\n"],["\u003cp\u003eRequires \u003ccode\u003epackageName\u003c/code\u003e and \u003ccode\u003esku\u003c/code\u003e as path parameters for identification.\u003c/p\u003e\n"],["\u003cp\u003eProvides optional query parameters for price conversion, product creation, and update latency.\u003c/p\u003e\n"],["\u003cp\u003eRequest and response bodies utilize the \u003ccode\u003eInAppProduct\u003c/code\u003e object schema.\u003c/p\u003e\n"],["\u003cp\u003eNeeds \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e authorization scope for access.\u003c/p\u003e\n"]]],["This outlines how to update an in-app product via a PUT request to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}`. It specifies the `packageName` and `sku` as path parameters. Query parameters allow for auto-converting prices (`autoConvertMissingPrices`), creating missing products (`allowMissing`), and setting latency tolerance (`latencyTolerance`). The request and response bodies both utilize the `InAppProduct` resource. This method now should not be used to update subscription. An authorization scope of `https://www.googleapis.com/auth/androidpublisher` is needed.\n"],null,["# Method: inappproducts.update\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\nUpdates an in-app product (a managed product or a subscription).\n\nThis method should no longer be used to update 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`PUT https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}`\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| `sku` | `string` Unique identifier for the in-app product. |\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| `allowMissing` | `boolean` If set to true, and the in-app product with the given packageName and sku doesn't exist, the in-app product will be created. |\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### 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 an 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`"]]