Method: monetization.onetimeproducts.purchaseOptions.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ả các ưu đãi trong một ứng dụng, sản phẩm hoặc lựa chọn mua hàng nhất định.
Yêu cầu HTTP
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
packageName |
string
Bắt buộc. Ứng dụng mẹ (tên gói) mà bạn nên đọc các ưu đãi.
|
productId |
string
Bắt buộc. Sản phẩm tính phí một lần gốc (mã nhận dạng) mà bạn nên đọc các ưu đãi. Bạn có thể chỉ định là "-" để đọc tất cả các sản phẩm trong một ứng dụng.
|
purchaseOptionId |
string
Bắt buộc. Lựa chọn mua tổng/chính (mã nhận dạng) mà bạn nên đọc các ưu đãi. Có thể chỉ định là "-" để đọc tất cả các ưu đãi trong một sản phẩm tính phí một lần hoặc một ứng dụng. Phải chỉ định là "-" nếu productId được chỉ định là "-".
|
Tham số truy vấn
Thông số |
pageSize |
integer
Không bắt buộc. Số lượng sản phẩm tối đa cần trả về. Dịch vụ có thể trả về ít hơn giá trị này. Nếu không chỉ định, tối đa 50 mặt hàng sẽ được trả về. Giá trị tối đa là 1000; các giá trị lớn hơn 1000 sẽ được chuyển đổi thành 1000.
|
pageToken |
string
Không bắt buộc. Mã thông báo trang nhận được từ một lệnh gọi ListOneTimeProductsOffers trước đó. Cung cấp thông tin này để truy xuất trang tiếp theo. Khi phân trang, productId, packageName và purchaseOptionId được cung cấp cho ListOneTimeProductsOffersRequest 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 offers.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 |
{
"oneTimeProductOffers": [
{
object (OneTimeProductOffer )
}
],
"nextPageToken": string
} |
Trường |
oneTimeProductOffers[] |
object (OneTimeProductOffer )
oneTimeProduct được cung cấp từ yêu cầu đã chỉ định.
|
nextPageToken |
string
Một mã thông báo có thể được gửi dưới dạng pageToken để truy xuất trang tiếp theo. Nếu bạn bỏ qua trường này, thì sẽ không có cá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."],[],[],null,["# Method: monetization.onetimeproducts.purchaseOptions.offers.list\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 - [JSON representation](#body.ListOneTimeProductOffersResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists all offers under a given app, product, or purchase option.\n\n### HTTP request\n\n`GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/oneTimeProducts/{productId}/purchaseOptions/{purchaseOptionId}/offers`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The parent app (package name) for which the offers should be read. |\n| `productId` | `string` Required. The parent one-time product (ID) for which the offers should be read. May be specified as '-' to read all offers under an app. |\n| `purchaseOptionId` | `string` Required. The parent purchase option (ID) for which the offers should be read. May be specified as '-' to read all offers under a one-time product or an app. Must be specified as '-' if productId is specified as '-'. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` Optional. The maximum number of offers to return. The service may return fewer than this value. If unspecified, at most 50 offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |\n| `pageToken` | `string` Optional. A page token, received from a previous `ListOneTimeProductsOffers` call. Provide this to retrieve the subsequent page. When paginating, productId, packageName and purchaseOptionId provided to `ListOneTimeProductsOffersRequest` must match the call that provided the page token. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for offers.list.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"oneTimeProductOffers\": [ { object (/android-publisher/api-ref/rest/v3/monetization.onetimeproducts.purchaseOptions.offers#OneTimeProductOffer) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `oneTimeProductOffers[]` | `object (`[OneTimeProductOffer](/android-publisher/api-ref/rest/v3/monetization.onetimeproducts.purchaseOptions.offers#OneTimeProductOffer)`)` The oneTimeProduct offers from the specified request. |\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\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]