Method: monetization.subscriptions.basePlans.offers.create
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.
Tạo ưu đãi thuê bao mới. Chỉ gói cơ bản tự động gia hạn mới có thể có ưu đãi thuê bao. Trạng thái của ưu đãi sẽ là DRAFT (BẢN ĐỒ RANH) cho đến khi được kích hoạt.
Yêu cầu HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
packageName |
string
Bắt buộc. Ứng dụng mẹ (tên gói) mà bạn muốn tạo ưu đãi. Phải bằng trường packageName trên tài nguyên Subscription (Gói thuê bao).
|
productId |
string
Bắt buộc. Gói thuê bao gốc (mã) mà bạn muốn tạo ưu đãi. Phải bằng trường productId trên tài nguyên SubscriptionOffer.
|
basePlanId |
string
Bắt buộc. Gói cơ bản gốc (mã) mà bạn muốn tạo ưu đãi. Phải bằng trường basePlanId trên tài nguyên SubscriptionOffer.
|
Tham số truy vấn
Tham số |
offerId |
string
Bắt buộc. Mã nhận dạng để sử dụng cho ưu đãi. Để biết các yêu cầu về định dạng này, hãy xem tài liệu về trường offerId trên tài nguyên SubscriptionOffer.
|
regionsVersion |
object (RegionsVersion )
Bắt buộc. Phiên bản của các khu vực có sẵn đang được sử dụng cho subscriptionOffer.
|
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 thực thể SubscriptionOffer
mới tạo.
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: 2024-12-17 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: 2024-12-17 UTC."],[[["Creates a new subscription offer for auto-renewing base plans, initially in DRAFT state until activated."],["Uses an HTTP POST request to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers` with specified path and query parameters."],["Requires providing a `SubscriptionOffer` object in the request body, detailing the offer's specifics."],["Upon success, the response body returns the newly created `SubscriptionOffer` object."],["Needs authorization with the `https://www.googleapis.com/auth/androidpublisher` OAuth scope."]]],["This document details how to create a new subscription offer for auto-renewing base plans. The `POST` request is sent to a specific URL with `packageName`, `productId`, and `basePlanId` as required path parameters. The `offerId` and `regionsVersion` are required query parameters. The request body must contain `SubscriptionOffer` data, and a successful response returns the newly created `SubscriptionOffer`. Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope.\n"]]