Method: monetization.subscriptions.basePlans.offers.patch
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Aktualizuje istniejącą ofertę subskrypcji.
Żądanie HTTP
PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscriptionOffer.packageName}/subscriptions/{subscriptionOffer.productId}/basePlans/{subscriptionOffer.basePlanId}/offers/{subscriptionOffer.offerId}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
subscriptionOffer.packageName |
string
To pole jest wymagane. Niezmienne. Nazwa pakietu aplikacji, do której należy subskrypcja nadrzędna.
|
subscriptionOffer.productId |
string
To pole jest wymagane. Niezmienne. Identyfikator subskrypcji nadrzędnej, do której należy ta oferta.
|
subscriptionOffer.basePlanId |
string
To pole jest wymagane. Niezmienne. Identyfikator abonamentu podstawowego, którego rozszerzenie jest rozszerzeniem tej oferty.
|
subscriptionOffer.offerId |
string
To pole jest wymagane. Niezmienne. Unikalny identyfikator tej oferty subskrypcji. Musi być niepowtarzalna w obrębie abonamentu podstawowego.
|
Parametry zapytania
Parametry |
updateMask |
string (FieldMask format)
To pole jest wymagane. Lista pól do zaktualizowania. Jest to lista rozdzielonych przecinkami pełnych i jednoznacznych nazw pól. Przykład: "user.displayName,photo" .
|
regionsVersion |
object (RegionsVersion )
To pole jest wymagane. Wersja dostępnych regionów używanych w przypadku oferty subscriptionOffer.
|
allowMissing |
boolean
Opcjonalnie. Jeśli zasada ma wartość Prawda, a oferta subskrypcji o podanej nazwie packageName, productId, basePlanId ani offerId nie istnieje, zostanie utworzona oferta. Jeśli zostanie utworzona nowa oferta, metoda updateMask zostanie zignorowana.
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
Opcjonalnie. Tolerancja czasu oczekiwania na rozpowszechnianie tej aktualizacji usługi. Wartość domyślna jest uwzględniana w czasie oczekiwania.
|
Treść żądania
Treść żądania zawiera wystąpienie elementu SubscriptionOffer
.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu SubscriptionOffer
.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/androidpublisher
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\u003eThis operation updates an existing subscription offer with a \u003ccode\u003ePATCH\u003c/code\u003e request to a specific URL.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to provide path parameters for package name, product ID, base plan ID, and offer ID to identify the target offer.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain the updated \u003ccode\u003eSubscriptionOffer\u003c/code\u003e object, and the response will return the modified \u003ccode\u003eSubscriptionOffer\u003c/code\u003e if successful.\u003c/p\u003e\n"],["\u003cp\u003eQuery parameters allow for specifying the fields to update (\u003ccode\u003eupdateMask\u003c/code\u003e), handling missing offers (\u003ccode\u003eallowMissing\u003c/code\u003e), and controlling update propagation latency (\u003ccode\u003elatencyTolerance\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes updating a subscription offer via a `PATCH` HTTP request to a specific URL. Key actions involve setting `packageName`, `productId`, `basePlanId`, and `offerId` in the URL path. The request body includes `SubscriptionOffer` data, and the response returns the updated `SubscriptionOffer`. `updateMask`, and `regionsVersion` are required query parameters; `allowMissing`, and `latencyTolerance` are optional. The operation requires `androidpublisher` OAuth scope.\n"],null,["# Method: monetization.subscriptions.basePlans.offers.patch\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 existing subscription offer.\n\n### HTTP request\n\n`PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscriptionOffer.packageName}/subscriptions/{subscriptionOffer.productId}/basePlans/{subscriptionOffer.basePlanId}/offers/{subscriptionOffer.offerId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------------------------|----------------------------------------------------------------------------------------------------------|\n| `subscriptionOffer.packageName` | `string` Required. Immutable. The package name of the app the parent subscription belongs to. |\n| `subscriptionOffer.productId` | `string` Required. Immutable. The ID of the parent subscription this offer belongs to. |\n| `subscriptionOffer.basePlanId` | `string` Required. Immutable. The ID of the base plan to which this offer is an extension. |\n| `subscriptionOffer.offerId` | `string` Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. |\n\n### Query parameters\n\n| Parameters ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. The list of fields to be updated. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n| `regionsVersion` | `object (`[RegionsVersion](/android-publisher/api-ref/rest/v3/RegionsVersion)`)` Required. The version of the available regions being used for the subscriptionOffer. |\n| `allowMissing` | `boolean` Optional. If set to true, and the subscription offer with the given packageName, productId, basePlanId and offerId doesn't exist, an offer will be created. If a new offer is created, updateMask is ignored. |\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 [SubscriptionOffer](/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers#SubscriptionOffer).\n\n### Response body\n\nIf successful, the response body contains an 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`"]]