Method: monetization.onetimeproducts.purchaseOptions.batchDelete
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחיקת אפשרויות רכישה במוצר אחד או יותר בחיוב חד-פעמי.
כברירת מחדל, הפעולה הזו תיכשל אם יש מבצעים קיימים באפשרויות הרכישה שנמחקו. כדי לשנות את התנהגות ברירת המחדל, משתמשים בפרמטר force.
בקשת HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions:batchDelete
כתובת ה-URL משתמשת בתחביר של gRPC Transcoding.
פרמטרים של נתיב
פרמטרים |
packageName |
string
חובה. אפליקציית האב (שם החבילה) של אפשרויות הרכישה שרוצים למחוק.
|
productId |
string
חובה. מזהה המוצר של המוצר הראשי בחיוב חד-פעמי, אם כל אפשרויות הרכישה שרוצים למחוק שייכות לאותו מוצר בחיוב חד-פעמי. אם המחיקה של קבוצת המוצרים כוללת כמה מוצרים בחיוב חד-פעמי, צריך להגדיר את השדה הזה כ-'-'.
|
גוף הבקשה
גוף הבקשה מכיל נתונים עם המבנה הבא:
שדות |
requests[] |
object (DeletePurchaseOptionRequest )
חובה. רשימה של בקשות למחיקה של עד 100 רכיבים. כל הבקשות צריכות למחוק אפשרויות רכישה ממוצרים שונים לרכישה חד-פעמית.
|
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה הוא אובייקט JSON ריק.
היקפי הרשאה
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/androidpublisher
DeletePurchaseOptionRequest
הודעת בקשה למחיקת אפשרות רכישה.
ייצוג ב-JSON |
{
"packageName": string,
"productId": string,
"purchaseOptionId": string,
"latencyTolerance": enum (ProductUpdateLatencyTolerance ),
"force": boolean
} |
שדות |
packageName |
string
חובה. אפליקציית האב (שם החבילה) של אפשרות הרכישה שרוצים למחוק.
|
productId |
string
חובה. מזהה המוצר הראשי בחיוב חד-פעמי של אפשרות הרכישה שרוצים למחוק.
|
purchaseOptionId |
string
חובה. המזהה של אפשרות הרכישה שרוצים למחוק.
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
אופציונלי. הסבילות לזמן האחזור בהפצת עדכון המוצר הזה. ברירת המחדל היא רגישות לזמן האחזור.
|
force |
boolean
אופציונלי. לשדה הזה אין השפעה על אפשרויות רכישה שלא כוללות מבצעים. לגבי אפשרויות רכישה עם מבצעים משויכים: * אם הערך של force מוגדר כ-false (ברירת מחדל), תוחזר שגיאה. * אם הערך של force מוגדר כ-true, כל המבצעים שמשויכים לאפשרות הרכישה יימחקו.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[],null,["# Method: monetization.onetimeproducts.purchaseOptions.batchDelete\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- [Authorization scopes](#body.aspect)\n- [DeletePurchaseOptionRequest](#DeletePurchaseOptionRequest)\n - [JSON representation](#DeletePurchaseOptionRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nDeletes purchase options across one or multiple one-time products.\n\nBy default this operation will fail if there are any existing offers under the deleted purchase options. Use the force parameter to override the default behavior.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions:batchDelete`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The parent app (package name) of the purchase options to delete. |\n| `productId` | `string` Required. The product ID of the parent one-time product, if all purchase options to delete belong to the same one-time product. If this batch delete spans multiple one-time products, set this field to \"-\". |\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/monetization.onetimeproducts.purchaseOptions/batchDelete#DeletePurchaseOptionRequest) } ] } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[DeletePurchaseOptionRequest](/android-publisher/api-ref/rest/v3/monetization.onetimeproducts.purchaseOptions/batchDelete#DeletePurchaseOptionRequest)`)` Required. A list of delete requests of up to 100 elements. All requests must delete purchase options from different one-time products. |\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`\n\nDeletePurchaseOptionRequest\n---------------------------\n\nRequest message for deleting a purchase option.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"packageName\": string, \"productId\": string, \"purchaseOptionId\": string, \"latencyTolerance\": enum (/android-publisher/api-ref/rest/v3/ProductUpdateLatencyTolerance), \"force\": boolean } ``` |\n\n| Fields ||\n|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The parent app (package name) of the purchase option to delete. |\n| `productId` | `string` Required. The parent one-time product (ID) of the purchase option to delete. |\n| `purchaseOptionId` | `string` Required. The purchase option ID of the purchase option to delete. |\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| `force` | `boolean` Optional. This field has no effect for purchase options with no offers under them. For purchase options with associated offers: \\* If `force` is set to false (default), an error will be returned. \\* If `force` is set to true, any associated offers under the purchase option will be deleted. |"]]