Method: subscriptions.list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
由經銷商管理的訂閱項目清單。這份清單可以是所有訂閱項目、所有客戶的訂閱項目,或是所有客戶的可轉移訂閱項目。
這個方法可視需要透過 customerNamePrefix
篩選回應。詳情請參閱「管理訂閱」。
HTTP 要求
GET https://reseller.googleapis.com/apps/reseller/v1/subscriptions
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
customerAuthToken |
string
如要建立轉售帳戶,以便轉移直接客戶的訂閱項目,或將其他經銷商客戶的訂閱項目轉移至您的經銷商管理系統,就必須使用 customerAuthToken 查詢字串。這是完成訂閱轉移作業所需的十六進位驗證權杖。詳情請參閱管理員說明中心。
|
customerId |
string
這可以是客戶的主網域名稱,或客戶的專屬 ID。如果客戶的網域名稱有所變更,您就無法使用舊網域名稱存取客戶,但您隨時可以使用客戶的專屬 ID (由 API 傳回)。建議您在適用的情況下,將專屬 ID 儲存在系統中。
|
customerNamePrefix |
string
擷取所有訂閱項目並篩選特定客戶時,您可以輸入客戶名稱的前置字串。以下範例客戶群組包含 exam.com 、example20.com 和 example.com : exa :傳回以「exa」開頭的所有客戶名稱,可能包括 exam.com 、example20.com 和 example.com 。名稱前置字串類似於使用規則運算式的星號 exa*。 example :傳回 example20.com 和 example.com 。
|
maxResults |
integer (uint32 format)
擷取大型清單時,maxResults 是每頁的結果數量上限。nextPageToken 值會將您帶往下一頁。預設值為 20。
|
pageToken |
string
用於指定清單中下一頁的符記
|
回應主體
訂閱項目會管理 Google 客戶的付款方案與產品 SKU、使用者授權、30 天免費試用狀態和續約選項的關係。經銷商的主要角色是管理 Google 客戶的訂閱項目。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"kind": string,
"subscriptions": [
{
object (Subscription )
}
],
"nextPageToken": string
} |
欄位 |
kind |
string
將資源標示為訂閱集合。值:reseller#subscriptions
|
subscriptions[] |
object (Subscription )
這個結果頁面中的訂閱項目。
|
nextPageToken |
string
接續符記,用於分頁瀏覽大型結果集。在後續要求中提供這個值,即可傳回下一頁結果。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/apps.order
https://www.googleapis.com/auth/apps.order.readonly
詳情請參閱授權指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],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)."]]