Method: inappproducts.batchDelete
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ลบไอเทมที่ซื้อในแอป (ผลิตภัณฑ์ที่มีการจัดการหรือการสมัครใช้บริการ)
ตั้งค่าช่อง latencyTolerance ในคำขอที่ฝังเป็น PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT เพื่อให้ได้อัตราข้อมูลอัปเดตสูงสุด
ไม่ควรใช้วิธีนี้เพื่อลบการติดตาม ดูข้อมูลเพิ่มเติมได้ที่บทความนี้
คำขอ HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchDelete
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
packageName |
string
ชื่อแพ็กเกจของแอป
|
เนื้อความของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
requests[] |
object (InappproductsDeleteRequest )
คำขอให้ลบแต่ละรายการ ต้องส่งคำขออย่างน้อย 1 รายการ มีคำขอได้สูงสุด 100 รายการ คำขอทั้งหมดต้องสอดคล้องกับไอเทมที่ซื้อในแอปที่แตกต่างกัน
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะเป็นออบเจ็กต์ JSON ว่าง
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/androidpublisher
InappproductsDeleteRequest
ช่อง |
packageName |
string
ชื่อแพ็กเกจของแอป
|
sku |
string
ตัวระบุที่ไม่ซ้ำกันสำหรับไอเทมที่ซื้อในแอป
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
ไม่บังคับ ความคลาดเคลื่อนของเวลาในการตอบสนองสำหรับการนำไปใช้งานการอัปเดตผลิตภัณฑ์นี้ ค่าเริ่มต้นคือคำนึงถึงความล่าช้า
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eDeletes in-app products (managed products or subscriptions) in batches using the \u003ccode\u003ebatchDelete\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing a list of delete requests, each specifying the package name and SKU of the in-app product to be deleted.\u003c/p\u003e\n"],["\u003cp\u003eSupports setting latency tolerance for product update propagation, potentially improving update throughput.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003eandroidpublisher\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to note that this method should not be used to delete subscriptions, as per the linked article.\u003c/p\u003e\n"]]],["This document details how to batch delete in-app products (excluding subscriptions) via the Android Publisher API. Key actions involve sending a `POST` request to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts:batchDelete`. The request body must include an array of `InappproductsDeleteRequest` objects, each specifying the `packageName`, `sku`, and optional `latencyTolerance`. The API uses `gRPC Transcoding`. Successful deletion returns an empty JSON object. Authorization requires the `androidpublisher` OAuth scope.\n"],null,["# Method: inappproducts.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- [InappproductsDeleteRequest](#InappproductsDeleteRequest)\n - [JSON representation](#InappproductsDeleteRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nDeletes 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 not be used to delete 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:batchDelete`\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/batchDelete#InappproductsDeleteRequest) } ] } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[InappproductsDeleteRequest](/android-publisher/api-ref/rest/v3/inappproducts/batchDelete#InappproductsDeleteRequest)`)` Individual delete 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\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\nInappproductsDeleteRequest\n--------------------------\n\nRequest to delete an in-app product.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"packageName\": string, \"sku\": string, \"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| `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. |"]]