建立或轉移訂閱

之後 訂購客戶帳戶 您可以建立多種訂閱項目

  • 按年訂閱
  • 靈活的訂閱方式
  • 30 天免費試用期
  • 以折扣價訂閱

如需進一步瞭解這類訂閱所用產品的資訊,請參見 產品和 SKU

如果你並未訂購這位客戶的帳戶,可以 轉移訂閱項目

擁有 customerType = 'team' 的客戶只能購買 Essentials 和 Google Workspace Enterprise Essentials 版本。如果您嘗試購買 上傳任何其他 Google Workspace 訂閱方案, 錯誤:Customer is not eligible to purchase this subscription。客戶 或按用量計費的訂閱方案可能無法處理 年約方案,且升級和降級選項有限。

建立訂閱項目

如要為新建立的客戶的帳戶建立訂閱,請使用 以下 POST HTTP 要求,並加入授權權杖:

POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions

CUSTOMER_ID 是 客戶的主網域名稱或客戶的專屬 ID, 擷取經銷商客戶帳戶

建立年約方案

如為年約方案訂閱項目,部分 SKU 不同 預設的續約設定。建議您一律傳遞 renewalSettings。創作 每年含 10 個帳戶名額的年約訂閱方案:

POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions
{
  "kind": "reseller#subscription",
  "customerId": "CUSTOMER_ID",
  "skuId": "SKU_ID",
  "plan": {
    "planName": "ANNUAL_MONTHLY_PAY"
  },
  "seats": {
    "kind": "subscriptions#seats",
    "numberOfSeats": 10
  },
  renewalSettings: {
    "renewalType": 'RENEW_CURRENT_USERS_MONTHLY_PAY'
  },
  "purchaseOrderId": "PURCHASE_ORDER_ID"
}

更改下列內容:

  • CUSTOMER_ID:客戶的主網域 名稱或客戶專屬 ID
  • SKU_ID:獨特的庫存單位 (SKU) 或 ID。若需更多資訊,請參閲 產品與SKU ID
  • PURCHASE_ORDER_ID:非必要的訂購單 可用來追蹤使用情況的 ID。

成功的回應會傳回 HTTP 200 狀態和新訂閱項目的 輕鬆設定年約方案ANNUAL_MONTHLY_PAY 傳回為 所有 API 回應中的 ANNUAL

以下是年約方案的回覆範例:

{
  "kind": "reseller#subscription",
  "customerId": "C0123456",
  "subscriptionId": "123",
  "billingMethod": "ONLINE",
  "skuId": "1010020028",
  "creationTime": "1331647980142",
  "plan": {
    "planName": "ANNUAL",
    "isCommitmentPlan": true,
    "commitmentInterval": {
      "startTime": "1331647980142",
      "endTime": "1363183980142"
    }
  },
  "seats": {
    "kind": "subscriptions#seats",
    "numberOfSeats": 10,
    "licensedNumberOfSeats": 10
  },
  "trialSettings": {
    "isInTrial": false
  },
  "renewalSettings": {
    "kind": "subscriptions#renewalSettings",
    "renewalType": "SWITCH_TO_PAY_AS_YOU_GO"
  },
  "purchaseOrderId": "my_example.com_annual_1",
  "status": "ACTIVE",
  "customerDomain": "my_example.com",
  "skuName": "Google Workspace Business Standard"
}

建立彈性方案

如要為新建立的客戶帳戶設定彈性訂閱,請使用 下列 POST HTTP 要求,並加入授權權杖:

POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions
{
  "kind": "reseller#subscription",
  "customerId": "CUSTOMER_ID",
  "skuId": "SKU_ID",
  "plan": {
    "planName": "FLEXIBLE"
  },
  "seats": {
    "kind": "subscriptions#seats",
    "maximumNumberOfSeats": 10
  },
  "purchaseOrderId": "PURCHASE_ORDER_ID"
}

更改下列內容:

  • CUSTOMER_ID:客戶的主網域 名稱或客戶專屬 ID
  • SKU_ID:獨特的庫存單位 (SKU) 或 ID。若需更多資訊,請參閲 產品與SKU ID
  • PURCHASE_ORDER_ID:非必要的訂購單 可用來追蹤使用情況的 ID。

以下是彈性方案回應範例:

{
  "kind": "reseller#subscription",
  "customerId": "C0123456",
  "subscriptionId": "123",
  "billingMethod": "ONLINE",
  "skuId": "1010020028",
  "creationTime": "1331647980142",
  "plan": {
    "planName": "FLEXIBLE",
    "isCommitmentPlan": false
  },
  "seats": {
    "kind": "subscriptions#seats",
    "maximumNumberOfSeats": 10,
    "licensedNumberOfSeats": 0
  },
  "trialSettings": {
    "isInTrial": false
  },
  "purchaseOrderId": "my_example_flex_1",
  "status": "ACTIVE",
  "customerDomain": "my_example.com",
  "skuName": "Google Workspace Business Standard"
}

建立免費試用方案

如何為新建立的客戶 帳戶,請使用以下 POST HTTP 要求,並加入授權 符記:

POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions
{
  "kind": "reseller#subscription",
  "customerId": "CUSTOMER_ID",
  "skuId": "SKU_ID",
  "plan": {
    "planName": "TRIAL"
  },
  "seats": {
    "kind": "subscriptions#seats",
    "maximumNumberOfSeats": 10
  },
  "purchaseOrderId": "PURCHASE_ORDER_ID"
}

更改下列內容:

  • CUSTOMER_ID:客戶的主網域 名稱或客戶專屬 ID
  • SKU_ID:獨特的庫存單位 (SKU) 或 ID。若需更多資訊,請參閲 產品與SKU ID
  • PURCHASE_ORDER_ID:非必要的訂購單 可用來追蹤使用情況的 ID。

以下是為期 30 天免費試用方案的回應範例:

{
  "kind": "reseller#subscription",
  "customerId": "C0123456",
  "subscriptionId": "123",
  "billingMethod": "ONLINE",
  "skuId": "1010020028",
  "creationTime": "1331647980142",
  "plan": {
    "planName": "TRIAL",
    "isCommitmentPlan": false
  },
  "seats": {
    "kind": "subscriptions#seats",
    "maximumNumberOfSeats": 10,
    "licensedNumberOfSeats": 0
  },
  "trialSettings": {
    "isInTrial": true,
    "trialEndTime": "1331648420142"
  },
  "purchaseOrderId": "my_example_trial_1",
  "status": "ACTIVE",
  "customerDomain": "my_example.com",
  "skuName": "Google Workspace Business Standard"
}

建立折扣訂閱項目

Google 可能會提供交易代碼,以便你以折扣價格建立訂閱項目 頻率。如要折扣訂閱方案,你必須提供以下交易代碼: 訂閱項目 insert 呼叫。如果客戶從自己的 原始 SKU,系統就會取消這項折扣。

為新建時建立折扣年約訂閱項目 客戶帳戶,請使用以下 POST HTTP 要求,並在當中加入 授權權杖:

POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions
{
  "kind": "reseller#subscription",
  "customerId": "CUSTOMER_ID",
  "skuId": "SKU_ID",
  "plan": {
    "planName": "ANNUAL_MONTHLY_PAY"
  },
  "seats": {
    "kind": "subscriptions#seats",
    "numberOfSeats": 10
  },
  renewalSettings: {
    "renewalType": 'RENEW_CURRENT_USERS_MONTHLY_PAY'
  },
  "purchaseOrderId": "PURCHASE_ORDER_ID",
  "dealCode": "GOOGLE_CONTRACT_DEAL_CODE"
}

更改下列內容:

  • CUSTOMER_ID:客戶的主網域 名稱或客戶專屬 ID
  • SKU_ID:獨特的庫存單位 (SKU) 或 ID。若需更多資訊,請參閲 產品與SKU ID
  • PURCHASE_ORDER_ID:非必要的訂購單 可用來追蹤使用情況的 ID。
  • GOOGLE_CONTRACT_DEAL_CODE:可用的折扣代碼 都是由 Google 開發的

以下是折扣年約方案的回應範例:

{
  "kind": "reseller#subscription",
  "customerId": "C0123456",
  "subscriptionId": "123",
  "billingMethod": "ONLINE",
  "skuId": "1010020028",
  "creationTime": "1331647980142",
  "plan": {
    "planName": "ANNUAL",
    "isCommitmentPlan": true,
    "commitmentInterval": {
      "startTime": "1331647980142",
      "endTime": "1363183980142"
    }
  },
  "seats": {
    "kind": "subscriptions#seats",
    "numberOfSeats": 10,
    "licensedNumberOfSeats": 10
  },
  "trialSettings": {
    "isInTrial": false
  },
  "renewalSettings": {
    "kind": "subscriptions#renewalSettings",
    "renewalType": "SWITCH_TO_PAY_AS_YOU_GO"
  },
  "purchaseOrderId": "my_example.com_annual_1",
  "status": "ACTIVE",
  "customerDomain": "my_example.com",
  "dealCode": "GOOGLE_CONTRACT_DEAL_CODE",
  "skuName": "Google Workspace Business Standard"
}

轉移訂閱內容

如果您沒有使用 訂購新的客戶帳戶 作業,請使用客戶的轉移權杖建立訂閱項目 該客戶。

如要為非訂購的客戶帳戶建立訂閱,請使用 下列 POST HTTP 要求:

POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions?customerAuthToken=TOKEN_VALUE

更改下列內容:

  • CUSTOMER_ID:客戶的主網域 名稱或客戶專屬 ID
  • TOKEN_VALUE:您的轉移權杖是由您的 用來追蹤協助客戶的客服專員姓名客戶產生憑證後,有效期限為 30 天。

如要進一步瞭解客戶如何取得轉移權杖,請參閱 Google Workspace 說明中心

如要轉移年約方案客戶訂閱,請使用 以下 POST HTTP 要求,並加入授權權杖:

POST https://reseller.googleapis.com/apps/reseller/v1/customers/C0123456/subscriptions?customerAuthToken=auth token
{
  "customerId": "CUSTOMER_ID",
  "skuId": "SKU_ID",
  "plan": {
    "planName": "ANNUAL_MONTHLY_PAY"
  },
  "seats": {
    "numberOfSeats": 10,
    "licensedNumberOfSeats": 10
  },
  "purchaseOrderId": "PURCHASE_ORDER_ID"
}

更改下列內容:

  • CUSTOMER_ID:客戶的主網域 名稱或客戶專屬 ID
  • SKU_ID:獨特的庫存單位 (SKU) 或 ID。若需更多資訊,請參閲 產品與SKU ID
  • PURCHASE_ORDER_ID:非必要的訂購單 可用來追蹤使用情況的 ID。

成功的回應會傳回 HTTP 200 狀態 代碼,以及已轉移訂閱的 年約方案:

{
  "kind": "reseller#subscription",
  "customerId": "C0123456",
  "subscriptionId": "123",
  "billingMethod": "ONLINE",
  "skuId": "1010020028",
  "creationTime": "1331647980142",
  "plan": {
    "planName": "ANNUAL",
    "isCommitmentPlan": true,
    "commitmentInterval": {
      "startTime": "1331647980142",
      "endTime": "1363183980142"
    }
  },
  "seats": {
    "kind": "subscriptions#seats",
    "numberOfSeats": 10,
    "licensedNumberOfSeats": 10
  },
  "trialSettings": {
    "isInTrial": false
  },
  "renewalSettings": {
    "kind": "subscriptions#renewalSettings",
    "renewalType": "SWITCH_TO_PAY_AS_YOU_GO"
  },
  "purchaseOrderId": "example.com_annual_1",
  "status": "ACTIVE",
  "resourceUiUrl": "URL to customer's Admin console dashboard",
  "skuName": "Google Workspace Business Standard"
}

轉移限制

如果轉移 Google Workspace 訂閱與相關聯的 Google 雲端硬碟 或 Google 保管箱訂閱方案,請使用 batch 作業 轉移狀態為 ACTIVE 的所有訂閱。轉移各項 逐一訂閱會導致錯誤。

只有在停權原因符合下列條件時,才能轉移已停權的訂閱項目 PENDING_TOS_ACCEPTANCETRIAL_ENDEDRENEWAL_WITH_TYPE_CANCEL

轉移舊版 SKU 時,subscriptions.list 會傳回 skuId 所需轉移的 SKU。SKU 的 skuId Customervly 已傳回 transferInfo.currentLegacySkuId。換 skuIds 的完整清單以及這些方案使用的產品,請參閱 產品與 SKU

無法轉移折扣交易代碼。