Method: monetization.subscriptions.patch
Koleksiyonlar ile düzeninizi koruyun İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Mevcut bir aboneliği günceller.
HTTP isteği
PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscription.packageName}/subscriptions/{subscription.productId}
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
subscription.packageName | string Sabit. Üst uygulamanın paket adı. |
subscription.productId | string Sabit. Ürünün benzersiz ürün kimliği. Üst uygulamada benzersizdir. Ürün kimlikleri küçük harf (a-z), rakam (0-9), alt çizgi (_) ve noktalardan (.) oluşmalıdır. Küçük harfle veya rakamla başlamalı ve 1 ila 40 (dahil) karakter uzunluğunda olmalıdır. |
Sorgu parametreleri
Parametreler |
updateMask | string (FieldMask format) Zorunlu. Güncellenecek alanların listesi. Bu, tam nitelikli alan adlarının virgülle ayrılmış bir listesidir. Örnek: "user.displayName,photo" . |
regionsVersion | object (RegionsVersion ) Zorunlu. Abonelik için kullanılan kullanılabilir bölgelerin sürümü. |
allowMissing | boolean İsteğe bağlı. Politika true (doğru) değerine ayarlanırsa ve belirtilen packageName ve productId ile bir abonelik mevcut değilse abonelik oluşturulur. Yeni bir abonelik oluşturulursa updateMask yok sayılır. |
latencyTolerance | enum (ProductUpdateLatencyTolerance ) İsteğe bağlı. Bu ürün güncellemesinin yayılması için gecikme toleransı. Varsayılan olarak gecikmeye duyarlıdır. |
İstek içeriği
İstek metni, Subscription
öğesinin bir örneğini içerir.
Yanıt gövdesi
Başarılıysa yanıt metni, Subscription
öğesinin bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamını gerektirir:
https://www.googleapis.com/auth/androidpublisher
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003eUpdates an existing subscription, or creates a new one if it doesn't exist and \u003ccode\u003eallowMissing\u003c/code\u003e is set to true.\u003c/p\u003e\n"],["\u003cp\u003eUses \u003ccode\u003ePATCH\u003c/code\u003e HTTP request with specified path and query parameters to update the subscription details.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the \u003ccode\u003epackageName\u003c/code\u003e, \u003ccode\u003eproductId\u003c/code\u003e, \u003ccode\u003eupdateMask\u003c/code\u003e, and \u003ccode\u003eregionsVersion\u003c/code\u003e for updates.\u003c/p\u003e\n"],["\u003cp\u003eRequest and response bodies contain a \u003ccode\u003eSubscription\u003c/code\u003e object, allowing access to subscription data.\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 document outlines the process for updating an existing subscription via a `PATCH` HTTP request to the Android Publisher API. Key actions include specifying the subscription to update using `packageName` and `productId` in the URL path. Required `updateMask` and `regionsVersion` query parameters detail the fields to modify and the region version. The request body uses the `Subscription` resource. Optional parameters `allowMissing` allows creating missing subscriptions, and `latencyTolerance` adjusts update propagation. Successful requests return an updated `Subscription` resource. The process requires `androidpublisher` authorization scope.\n"],null,["- [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.\n\nHTTP request\n\n`PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscription.packageName}/subscriptions/{subscription.productId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `subscription.packageName` | `string` Immutable. Package name of the parent app. |\n| `subscription.productId` | `string` Immutable. Unique product ID of the product. Unique within the parent app. Product IDs must be composed of lower-case letters (a-z), numbers (0-9), underscores (_) and dots (.). It must start with a lower-case letter or number, and be between 1 and 40 (inclusive) characters in length. |\n\nQuery 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 subscription. |\n| `allowMissing` | `boolean` Optional. If set to true, and the subscription with the given packageName and productId doesn't exist, the subscription will be created. If a new subscription 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\nRequest body\n\nThe request body contains an instance of [Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription).\n\nResponse body\n\nIf successful, the response body contains an instance of [Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]