Method: subscriptions.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.
Danh sách các gói thuê bao do đại lý quản lý. Danh sách này có thể là tất cả gói thuê bao, tất cả gói thuê bao của khách hàng hoặc tất cả gói thuê bao có thể chuyển của khách hàng.
Nếu muốn, phương thức này có thể lọc phản hồi theo customerNamePrefix
. Để biết thêm thông tin, hãy xem bài viết quản lý gói thuê bao.
Yêu cầu HTTP
GET https://reseller.googleapis.com/apps/reseller/v1/subscriptions
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số truy vấn
Thông số |
customerAuthToken |
string
Chuỗi truy vấn customerAuthToken là bắt buộc khi tạo tài khoản được bán lại để chuyển gói thuê bao của khách hàng trực tiếp hoặc chuyển gói thuê bao của khách hàng đại lý khác sang tài khoản quản lý đại lý của bạn. Đây là mã thông báo xác thực thập lục phân cần thiết để hoàn tất quá trình chuyển gói thuê bao. Để biết thêm thông tin, hãy xem trung tâm trợ giúp dành cho quản trị viên.
|
customerId |
string
Đây có thể là tên miền chính của khách hàng hoặc giá trị nhận dạng duy nhất của khách hàng. Nếu tên miền của khách hàng thay đổi, bạn không thể sử dụng tên miền cũ để truy cập vào khách hàng đó, nhưng bạn luôn có thể sử dụng giá trị nhận dạng duy nhất của khách hàng (do API trả về). Bạn nên lưu trữ giá trị nhận dạng duy nhất trong hệ thống của mình (nếu có).
|
customerNamePrefix |
string
Khi truy xuất tất cả gói thuê bao và lọc cho khách hàng cụ thể, bạn có thể nhập tiền tố cho tên khách hàng. Sử dụng một nhóm khách hàng mẫu bao gồm exam.com , example20.com và example.com : exa – Trả về tất cả tên khách hàng bắt đầu bằng "exa", có thể bao gồm exam.com , example20.com và example.com . Tiền tố tên tương tự như việc sử dụng dấu hoa thị của biểu thức chính quy, exa*. example – Trả về example20.com và example.com .
|
maxResults |
integer (uint32 format)
Khi truy xuất một danh sách lớn, maxResults là số kết quả tối đa trên mỗi trang. Giá trị nextPageToken sẽ đưa bạn đến trang tiếp theo. Giá trị mặc định là 20.
|
pageToken |
string
Mã thông báo để chỉ định trang tiếp theo trong danh sách
|
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
Gói thuê bao quản lý mối quan hệ giữa kế hoạch thanh toán của khách hàng Google với SKU của sản phẩm, giấy phép người dùng, trạng thái dùng thử miễn phí 30 ngày và các lựa chọn gia hạn. Vai trò chính của đại lý là quản lý các gói thuê bao của khách hàng Google.
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 |
{
"kind": string,
"subscriptions": [
{
object (Subscription )
}
],
"nextPageToken": string
} |
Trường |
kind |
string
Xác định tài nguyên là một tập hợp các gói thuê bao. Giá trị: reseller#subscriptions
|
subscriptions[] |
object (Subscription )
Các gói thuê bao trong trang kết quả này.
|
nextPageToken |
string
Mã thông báo tiếp tục, dùng để phân trang qua các tập hợp kết quả lớn. Cung cấp giá trị này trong một yêu cầu tiếp theo để trả về trang kết quả tiếp theo.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/apps.order
https://www.googleapis.com/auth/apps.order.readonly
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
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-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Method: subscriptions.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.Subscriptions.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions.\n\nOptionally, this method can filter the response by a `customerNamePrefix`. For more information, see [manage subscriptions](https://developers.google.com/workspace/admin/reseller/v1/how-tos/manage_subscriptions).\n\n### HTTP request\n\n`GET https://reseller.googleapis.com/apps/reseller/v1/subscriptions`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customerAuthToken` | `string` The `customerAuthToken` query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the [administrator help center](//support.google.com/a/bin/answer.py?answer=142336). |\n| `customerId` | `string` This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable. |\n| `customerNamePrefix` | `string` When retrieving all of your subscriptions and filtering for specific customers, you can enter a prefix for a customer name. Using an example customer group that includes `exam.com`, `example20.com` and `example.com`: - `exa` -- Returns all customer names that start with 'exa' which could include `exam.com`, `example20.com`, and `example.com`. A name prefix is similar to using a regular expression's asterisk, exa\\*. - `example` -- Returns `example20.com` and `example.com`. \u003cbr /\u003e |\n| `maxResults` | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` When retrieving a large list, the `maxResults` is the maximum number of results per page. The `nextPageToken` value takes you to the next page. The default is 20. |\n| `pageToken` | `string` Token to specify next page in the list |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA subscription manages the relationship of a Google customer's payment plan with a product's SKU, user licenses, 30-day free trial status, and renewal options. A primary role of a reseller is to manage the Google customer's subscriptions.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"subscriptions\": [ { object (/workspace/admin/reseller/reference/rest/v1/subscriptions#Subscription) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the resource as a collection of subscriptions. Value: reseller#subscriptions |\n| `subscriptions[]` | `object (`[Subscription](/workspace/admin/reseller/reference/rest/v1/subscriptions#Subscription)`)` The subscriptions in this page of results. |\n| `nextPageToken` | `string` The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/apps.order`\n- `\n https://www.googleapis.com/auth/apps.order.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]