订购客户帐号后,您可以创建许多不同的订阅:
- 包年合约订阅
- 弹性订阅
- 30 天免费试用
- 享有折扣的订阅
如需详细了解这些订阅使用的产品,请参阅产品和 SKU。
如果您未订购此客户的账号,则可以转移订阅。
使用 customerType = 'team'
的客户只能购买 Google Workspace 基本功能版和企业基本功能版。如果您尝试购买任何其他 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
是客户的主域名,或是在检索转销商客户的账号时返回的客户唯一标识符。
创建包年合约方案
对于包年套餐订阅,并非所有 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
:客户的主域名或客户的唯一标识符。SKU_ID
:唯一库存单元 (SKU) 标识符。如需了解详情,请参阅产品和 SKU ID。PURCHASE_ORDER_ID
:可用于跟踪使用情况的可选采购订单 ID。
成功响应将返回 HTTP 200
状态以及新订阅的包年套餐设置。在所有 API 响应中,ANNUAL_MONTHLY_PAY
都会以 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
:客户的主域名或客户的唯一标识符。SKU_ID
:唯一库存单元 (SKU) 标识符。如需了解详情,请参阅产品和 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"
}
创建免费试用
要为新创建的客户帐号创建 30 天的免费试用订阅,请使用以下 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
:客户的主域名或客户的唯一标识符。SKU_ID
:唯一库存单元 (SKU) 标识符。如需了解详情,请参阅产品和 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
:客户的主域名或客户的唯一标识符。SKU_ID
:唯一库存单元 (SKU) 标识符。如需了解详情,请参阅产品和 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
:客户的主域名或客户的唯一标识符。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
:客户的主域名或客户的唯一标识符。SKU_ID
:唯一库存单元 (SKU) 标识符。如需了解详情,请参阅产品和 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_ACCEPTANCE
、TRIAL_ENDED
或 RENEWAL_WITH_TYPE_CANCEL
时,才能转移已暂停的订阅。
转移旧版 SKU 时,subscriptions.list
会返回需要转移的 SKU 的 skuId
。客户实际拥有的 SKU 的 skuId
作为 transferInfo.currentLegacySkuId
返回。如需查看 skuIds
的完整列表以及这些方案使用的产品,请参阅产品和 SKU。
转移不适用于折扣交易代码。