Method: monetization.subscriptions.basePlans.offers.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.
Cập nhật một ưu đãi hiện có cho gói thuê bao.
Yêu cầu HTTP
PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscriptionOffer.packageName}/subscriptions/{subscriptionOffer.productId}/basePlans/{subscriptionOffer.basePlanId}/offers/{subscriptionOffer.offerId}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
subscriptionOffer.packageName | string Bắt buộc. Không thể thay đổi. Tên gói của ứng dụng chứa gói thuê bao gốc. |
subscriptionOffer.productId | string Bắt buộc. Không thể thay đổi. Mã của gói thuê bao chính. |
subscriptionOffer.basePlanId | string Bắt buộc. Không thể thay đổi. Mã của gói cơ bản mà ưu đãi này là gói gia hạn. |
subscriptionOffer.offerId | string Bắt buộc. Không thể thay đổi. Mã nhận dạng duy nhất của ưu đãi cho gói thuê bao này. Phải là duy nhất trong gói cơ bản. |
Tham số truy vấn
Thông số |
updateMask | string (FieldMask format) Bắt buộc. Danh sách các trường cần cập nhật. Đây là danh sách các tên trường đủ điều kiện được phân tách bằng dấu phẩy. Ví dụ: "user.displayName,photo" |
regionsVersion | object (RegionsVersion ) Bắt buộc. Phiên bản của các khu vực hiện có đang được dùng cho gói thuê baoƯu đãi. |
allowMissing | boolean Không bắt buộc. Nếu bạn đặt chính sách này thành true (đúng) và ưu đãi gói thuê bao có packageName, productId, basePlanId và offerId đã cho không tồn tại, thì chương trình ưu đãi sẽ được tạo. Nếu bạn tạo một ưu đãi mới, updateMask sẽ bị bỏ qua. |
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 SubscriptionOffer
.
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 SubscriptionOffer
.
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.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eThis operation updates an existing subscription offer with a \u003ccode\u003ePATCH\u003c/code\u003e request to a specific URL.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to provide path parameters for package name, product ID, base plan ID, and offer ID to identify the target offer.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain the updated \u003ccode\u003eSubscriptionOffer\u003c/code\u003e object, and the response will return the modified \u003ccode\u003eSubscriptionOffer\u003c/code\u003e if successful.\u003c/p\u003e\n"],["\u003cp\u003eQuery parameters allow for specifying the fields to update (\u003ccode\u003eupdateMask\u003c/code\u003e), handling missing offers (\u003ccode\u003eallowMissing\u003c/code\u003e), and controlling update propagation latency (\u003ccode\u003elatencyTolerance\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes updating a subscription offer via a `PATCH` HTTP request to a specific URL. Key actions involve setting `packageName`, `productId`, `basePlanId`, and `offerId` in the URL path. The request body includes `SubscriptionOffer` data, and the response returns the updated `SubscriptionOffer`. `updateMask`, and `regionsVersion` are required query parameters; `allowMissing`, and `latencyTolerance` are optional. The operation requires `androidpublisher` OAuth scope.\n"],null,["- [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 offer.\n\nHTTP request\n\n`PATCH https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{subscriptionOffer.packageName}/subscriptions/{subscriptionOffer.productId}/basePlans/{subscriptionOffer.basePlanId}/offers/{subscriptionOffer.offerId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|---------------------------------|----------------------------------------------------------------------------------------------------------|\n| `subscriptionOffer.packageName` | `string` Required. Immutable. The package name of the app the parent subscription belongs to. |\n| `subscriptionOffer.productId` | `string` Required. Immutable. The ID of the parent subscription this offer belongs to. |\n| `subscriptionOffer.basePlanId` | `string` Required. Immutable. The ID of the base plan to which this offer is an extension. |\n| `subscriptionOffer.offerId` | `string` Required. Immutable. Unique ID of this subscription offer. Must be unique within the base plan. |\n\nQuery 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 subscriptionOffer. |\n| `allowMissing` | `boolean` Optional. If set to true, and the subscription offer with the given packageName, productId, basePlanId and offerId doesn't exist, an offer will be created. If a new offer 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\nRequest body\n\nThe request body contains an instance of [SubscriptionOffer](/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers#SubscriptionOffer).\n\nResponse body\n\nIf successful, the response body contains an instance of [SubscriptionOffer](/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers#SubscriptionOffer).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]