Method: inappproducts.batchUpdate
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Aktualizuje lub wstawia co najmniej 1 produkt w aplikacji (produkt zarządzanym lub subskrypcję).
Aby uzyskać maksymalną przepustowość aktualizacji, ustaw pole Tolerancja czasu oczekiwania w przypadku zagnieżdżonych żądań na PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT.
Tej metody nie należy już używać do aktualizowania subskrypcji. Więcej informacji znajdziesz w tym artykule.
Żądanie HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchUpdate
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
packageName |
string
Nazwa pakietu aplikacji.
|
Treść żądania
Treść żądania zawiera dane o następującej strukturze:
Pola |
requests[] |
object (InappproductsUpdateRequest )
Wymagane. Pojedyncze prośby o aktualizację. Wymagane jest co najmniej 1 żądanie. Może zawierać do 100 żądań. Wszystkie żądania muszą odpowiadać różnym produktom w aplikacji.
|
Treść odpowiedzi
Odpowiedź na zbiorczą aktualizację produktu w aplikacji.
W przypadku powodzenia treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"inappproducts": [
{
object (InAppProduct )
}
]
} |
Pola |
inappproducts[] |
object (InAppProduct )
Zaktualizowane lub wstawione produkty w aplikacji.
|
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/androidpublisher
InappproductsUpdateRequest
Prośba o zaktualizowanie produktu w aplikacji.
Zapis JSON |
{
"packageName": string,
"sku": string,
"autoConvertMissingPrices": boolean,
"inappproduct": {
object (InAppProduct )
},
"allowMissing": boolean,
"latencyTolerance": enum (ProductUpdateLatencyTolerance )
} |
Pola |
packageName |
string
Nazwa pakietu aplikacji.
|
sku |
string
Unikalny identyfikator produktu w aplikacji.
|
autoConvertMissingPrices |
boolean
Jeśli zasada ma wartość „prawda”, ceny we wszystkich regionach, na które kierowana jest aplikacja nadrzędna, które nie mają określonej ceny produktu w aplikacji, zostaną automatycznie przeliczone na walutę docelową na podstawie ceny domyślnej. Wartość domyślna to fałsz.
|
inappproduct |
object (InAppProduct )
Nowy produkt w aplikacji.
|
allowMissing |
boolean
Jeśli ma wartość true (prawda), a produkt w aplikacji z podaną nazwą packageName i kodem SKU nie istnieje, zostanie on utworzony.
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
Opcjonalnie: Tolerancja czasu oczekiwania na rozpowszechnienie tej aktualizacji usługi. Domyślnie uwzględniany jest czas oczekiwania.
|
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eUpdates or inserts one or more in-app products (managed products or subscriptions) using batch update.\u003c/p\u003e\n"],["\u003cp\u003eThis method utilizes an HTTP POST request to \u003ccode\u003ehttps://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchUpdate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach request can contain up to 100 individual update requests, all corresponding to different in-app products.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003elatencyTolerance\u003c/code\u003e can be set to \u003ccode\u003ePRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT\u003c/code\u003e for maximum throughput.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This outlines the `batchUpdate` method for in-app products, accessible via a POST HTTP request to a specified URL. It allows updating or inserting multiple in-app products (managed products) within a single request, capped at 100. The request body contains an array of `InappproductsUpdateRequest` objects, each defining updates to an in-app product using its package name and unique SKU, with option to automatically convert missing prices. The response returns a list of the updated or inserted in-app products. Subscription updates are not supported by this method.\n"],null,["# Method: inappproducts.batchUpdate\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 - [JSON representation](#body.InappproductsBatchUpdateResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [InappproductsUpdateRequest](#InappproductsUpdateRequest)\n - [JSON representation](#InappproductsUpdateRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nUpdates or inserts one or more in-app products (managed products or subscriptions).\n\nSet the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput.\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`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchUpdate`\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### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requests\": [ { object (/android-publisher/api-ref/rest/v3/inappproducts/batchUpdate#InappproductsUpdateRequest) } ] } ``` |\n\n| Fields ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[InappproductsUpdateRequest](/android-publisher/api-ref/rest/v3/inappproducts/batchUpdate#InappproductsUpdateRequest)`)` Required. Individual update requests. At least one request is required. Can contain up to 100 requests. All requests must correspond to different in-app products. |\n\n### Response body\n\nResponse for a batch in-app product update.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------|\n| ``` { \"inappproducts\": [ { object (/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct) } ] } ``` |\n\n| Fields ||\n|-------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `inappproducts[]` | `object (`[InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct)`)` The updated or inserted in-app products. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`\n\nInappproductsUpdateRequest\n--------------------------\n\nRequest to update an in-app product.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"packageName\": string, \"sku\": string, \"autoConvertMissingPrices\": boolean, \"inappproduct\": { object (/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct) }, \"allowMissing\": boolean, \"latencyTolerance\": enum (/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance) } ``` |\n\n| Fields ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Package name of the app. |\n| `sku` | `string` Unique identifier for the in-app product. |\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| `inappproduct` | `object (`[InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct)`)` The new in-app product. |\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. |"]]