Method: monetization.subscriptions.basePlans.offers.list
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.
Liệt kê tất cả ưu đãi của một gói thuê bao cụ thể.
Yêu cầu HTTP
GET 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) cần đọc các gói thuê bao.
|
productId |
string
Bắt buộc. Gói thuê bao chính (Mã nhận dạng) cần được đọc ưu đãi. Có thể được chỉ định là '-' để đọc tất cả các ưu đãi trong một ứng dụng.
|
basePlanId |
string
Bắt buộc. Gói cơ bản (mã) chính mà bạn cần đọc ưu đãi. Có thể được chỉ định là '-' để đọc tất cả các ưu đãi trong một gói thuê bao hoặc ứng dụng. Phải được chỉ định là '-' nếu productId được chỉ định là '-'.
|
Tham số truy vấn
Tham số |
pageSize |
integer
Số lượng gói thuê bao tối đa cần trả về. Dịch vụ có thể trả về ít hơn giá trị này. Nếu bạn không chỉ định, hệ thống sẽ trả về tối đa 50 gói thuê bao. Giá trị tối đa là 1000; các giá trị lớn hơn 1000 sẽ bị buộc thành 1000.
|
pageToken |
string
Mã thông báo trang, nhận được từ lệnh gọi ListSubscriptionsOffers trước đó. Cung cấp mã này để truy xuất trang tiếp theo. Khi phân trang, tất cả các tham số khác được cung cấp cho offers.list phải khớp với lệnh gọi đã cung cấp mã thông báo trang.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Thông báo phản hồi cho offer.list.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"subscriptionOffers": [
{
object (SubscriptionOffer )
}
],
"nextPageToken": string
} |
Trường |
subscriptionOffers[] |
object (SubscriptionOffer )
Gói thuê bao ưu đãi từ gói thuê bao đã chỉ định.
|
nextPageToken |
string
Mã thông báo có thể được gửi dưới dạng pageToken để truy xuất trang tiếp theo. Nếu trường này bị bỏ qua thì sẽ không có trang tiếp theo.
|
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\u003eLists all subscription offers under a given base plan, subscription, or app.\u003c/p\u003e\n"],["\u003cp\u003eThe request is a standard \u003ccode\u003eGET\u003c/code\u003e request with path and query parameters for filtering.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes an array of \u003ccode\u003eSubscriptionOffer\u003c/code\u003e objects and a token for pagination.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This document details how to retrieve a list of subscription offers for an Android app. The core action is a `GET` HTTP request to a specific URL: `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers`. The request requires specifying the app's package name, subscription ID, and base plan ID as path parameters. Optional query parameters `pageSize` and `pageToken` control the number of results and pagination. The response body returns a list of subscription offers and a potential token for the next page. It requires specific authorization scopes.\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 - [JSON representation](#body.ListSubscriptionOffersResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists all offers under a given subscription.\n\nHTTP request\n\n`GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The parent app (package name) for which the subscriptions should be read. |\n| `productId` | `string` Required. The parent subscription (ID) for which the offers should be read. May be specified as '-' to read all offers under an app. |\n| `basePlanId` | `string` Required. The parent base plan (ID) for which the offers should be read. May be specified as '-' to read all offers under a subscription or an app. Must be specified as '-' if productId is specified as '-'. |\n\nQuery parameters\n\n| Parameters ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 50 subscriptions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |\n| `pageToken` | `string` A page token, received from a previous `ListSubscriptionsOffers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `offers.list` must match the call that provided the page token. |\n\nRequest body\n\nThe request body must be empty.\n\nResponse body Response message for offers.list.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"subscriptionOffers\": [ { object (/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers#SubscriptionOffer) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `subscriptionOffers[]` | `object (`[SubscriptionOffer](/android-publisher/api-ref/rest/v3/monetization.subscriptions.basePlans.offers#SubscriptionOffer)`)` The subscription offers from the specified subscription. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]