Method: inappproducts.patch
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แพตช์ไอเทมที่ซื้อในแอป (ไอเทมที่มีการจัดการหรือการสมัครใช้บริการ)
ไม่ควรใช้วิธีการนี้เพื่ออัปเดตการสมัครใช้บริการอีกต่อไป ดูข้อมูลเพิ่มเติมได้จากบทความนี้
คำขอ HTTP
PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
packageName |
string
ชื่อแพ็กเกจของแอป
|
sku |
string
ตัวระบุที่ไม่ซ้ำกันสำหรับไอเทมที่ซื้อในแอป
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
autoConvertMissingPrices |
boolean
หากค่าเป็น "จริง" สำหรับทุกภูมิภาคที่กำหนดเป้าหมายโดยแอปหลักที่ไม่ได้ระบุราคาสำหรับผลิตภัณฑ์ที่ซื้อในแอปนี้ ระบบจะแปลงสกุลเงินเป้าหมายโดยอัตโนมัติตามราคาเริ่มต้น ค่าเริ่มต้นคือ false
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
ไม่บังคับ การยอมรับเวลาในการตอบสนองสำหรับการนำไปใช้งานของการอัปเดตผลิตภัณฑ์นี้ ค่าเริ่มต้นจะคำนึงถึงเวลาในการตอบสนอง
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ InAppProduct
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ InAppProduct
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/androidpublisher
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThis operation patches an in-app product, either a managed product or a subscription, within a specified app.\u003c/p\u003e\n"],["\u003cp\u003eIt involves providing the package name and product's unique identifier (SKU) as path parameters.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can optionally control auto-conversion of missing prices and update propagation latency using query parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe request and successful response both utilize the \u003ccode\u003eInAppProduct\u003c/code\u003e object for data transfer.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This API patches in-app products, including managed products and subscriptions, via a `PATCH` HTTP request to a specified URL. The URL requires the app's `packageName` and the product's `sku` as path parameters. Optional query parameters, `autoConvertMissingPrices` and `latencyTolerance`, are available. The request and response body use the `InAppProduct` instance. This process needs `https://www.googleapis.com/auth/androidpublisher` OAuth scope. Note that updating subscriptions through this method is deprecated.\n"],null,["# Method: inappproducts.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\nPatches an in-app product (a managed product or a subscription).\n\nThis method should no longer be used to update 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`PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}`\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| `sku` | `string` Unique identifier for the in-app product. |\n\n### Query parameters\n\n| Parameters ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `autoConvertMissingPrices` | `boolean` If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. |\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 [InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct).\n\n### Response body\n\nIf successful, the response body contains an instance of [InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]