Method: accounts.customers.queryEligibleBillingAccounts

Lists the billing accounts that are eligible to purchase particular SKUs for a given customer.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: Based on the provided list of SKUs, returns a list of SKU groups that must be purchased using the same billing account and the billing accounts eligible to purchase each SKU group.

HTTP request

GET https://cloudchannel.googleapis.com/v1alpha1/{customer=accounts/*/customers/*}:queryEligibleBillingAccounts

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customer

string

Required. The resource name of the customer to list eligible billing accounts for. Format: accounts/{account_id}/customers/{customer_id}.

Query parameters

Parameters
skus[]

string

Required. List of SKUs to list eligible billing accounts for. At least one SKU is required. Format: products/{productId}/skus/{skuId}.

Request body

The request body must be empty.

Response body

Response message for customers.queryEligibleBillingAccounts.

If successful, the response body contains data with the following structure:

JSON representation
{
  "skuPurchaseGroups": [
    {
      object (SkuPurchaseGroup)
    }
  ]
}
Fields
skuPurchaseGroups[]

object (SkuPurchaseGroup)

List of SKU purchase groups where each group represents a set of SKUs that must be purchased using the same billing account. Each SKU from [QueryEligibleBillingAccountsRequest.skus] will appear in exactly one SKU group.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/apps.order

For more information, see the Authentication Overview.

SkuPurchaseGroup

Represents a set of SKUs that must be purchased using the same billing account.

JSON representation
{
  "skus": [
    string
  ],
  "billingAccountPurchaseInfos": [
    {
      object (BillingAccountPurchaseInfo)
    }
  ]
}
Fields
skus[]

string

Resource names of the SKUs included in this group. Format: products/{productId}/skus/{skuId}.

billingAccountPurchaseInfos[]

object (BillingAccountPurchaseInfo)

List of billing accounts that are eligible to purhcase these SKUs.

BillingAccountPurchaseInfo

Represents a billing account that can be used to make a purchase.

JSON representation
{
  "billingAccount": {
    object (BillingAccount)
  }
}
Fields
billingAccount

object (BillingAccount)

The billing account resource.

BillingAccount

Represents a billing account.

JSON representation
{
  "name": string,
  "displayName": string,
  "createTime": string,
  "currencyCode": string,
  "regionCode": string
}
Fields
name

string

Output only. Resource name of the billing account. Format: accounts/{account_id}/billingAccounts/{billing_account_id}.

displayName

string

Display name of the billing account.

createTime

string (Timestamp format)

Output only. The time when this billing account was created.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

currencyCode

string

Output only. The 3-letter currency code defined in ISO 4217.

regionCode

string

Output only. The CLDR region code.