Method: inappproducts.patch
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Bản vá một sản phẩm trong ứng dụng (sản phẩm được quản lý hoặc gói thuê bao).
Bạn không nên dùng phương thức này để cập nhật gói thuê bao nữa. Hãy xem bài viết này để biết thêm thông tin.
Yêu cầu HTTP
PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts/{sku}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
packageName |
string
Tên gói của ứng dụng.
|
sku |
string
Giá trị nhận dạng duy nhất của sản phẩm trong ứng dụng.
|
Tham số truy vấn
Thông số |
autoConvertMissingPrices |
boolean
Nếu ứng dụng gốc nhắm mục tiêu đến giá đúng cho tất cả các khu vực nhưng chưa chỉ định mức giá cho sản phẩm trong ứng dụng này, thì hệ thống sẽ tự động quy đổi sang đơn vị tiền tệ mục tiêu dựa trên giá mặc định. Giá trị mặc định là false.
|
latencyTolerance |
enum (ProductUpdateLatencyTolerance )
Không bắt buộc. Dung sai về độ trễ khi truyền bản cập nhật sản phẩm này. Giá trị mặc định là phụ thuộc vào độ trễ.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa một bản sao của InAppProduct
.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của InAppProduct
.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/androidpublisher
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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`"]]