Method: monetization.subscriptions.patch
קל לארגן דפים בעזרת אוספים אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בקשת HTTP
PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscription.packageName}/subscriptions/{subscription.productId}
בכתובת ה-URL נעשה שימוש בתחביר המרת gRPC.
פרמטרים של נתיב
פרמטרים |
subscription.packageName | string לא משתנה. שם החבילה של אפליקציית ההורה. |
subscription.productId | string לא משתנה. המזהה הייחודי של המוצר. ייחודיים באפליקציית ההורה. מזהי מוצרים חייבים לכלול אותיות קטנות (a-z), מספרים (0-9), קווים תחתונים (_) ונקודות (.). הם חייבים להתחיל באות קטנה או במספר ועליו להיות באורך של 1 עד 40 תווים (כולל). |
פרמטרים של שאילתה
פרמטרים |
updateMask | string (FieldMask format) חובה. רשימת השדות לעדכון. זוהי רשימה של שמות שדות מלאים, שמופרדים בפסיקים. דוגמה: "user.displayName,photo" |
regionsVersion | object (RegionsVersion ) חובה. גרסת האזורים הזמינים במינוי. |
allowMissing | boolean אפשרות. אם המדיניות מוגדרת כ-True, המינוי עם ה-packageName ו-productId שצוינו לא קיים, המינוי ייווצר. אם נוצר מינוי חדש, המערכת תתעלם מ-updateMask. |
latencyTolerance | enum (ProductUpdateLatencyTolerance ) אפשרות. זמן האחזור של הפצת עדכון המוצר הזה ברירת המחדל היא תלוית זמן אחזור. |
גוף הבקשה
גוף הבקשה מכיל מופע של Subscription
.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של Subscription
.
היקפי הרשאות
נדרש היקף 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\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,["# Method: monetization.subscriptions.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.\n\n### HTTP 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\n### Path 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\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 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\n### Request body\n\nThe request body contains an instance of [Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription).\n\n### Response body\n\nIf successful, the response body contains an instance of [Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]