Code Samples for the Chrome Management Customer Subscriptions API

Visit Customer Subscriptions API for an overview of API features.

All the requests on this page use the following variables:

  • $TOKEN - OAuth2 token
  • $CUSTOMER - ID of the customer (e.g. C01234567) or literal my_customer

Get Customer Subscription Information

Get the aggregated subscription and license information for a customer.

Request

curl -H "Authorization: Bearer $TOKEN" \
https://chromemanagement.googleapis.com/v1/customers/$CUSTOMER/subscriptionInfo

You can also use the my_customer alias to retrieve subscription information for the caller's own domain:

curl -H "Authorization: Bearer $TOKEN" \
https://chromemanagement.googleapis.com/v1/customers/my_customer/subscriptionInfo

Response

{
  "name": "customers/$CUSTOMER/subscriptionInfo",
  "chromeEnterpriseUpgradeAnnual": {
    "counts": {
      "totalPurchasedCount": "300",
      "assignedCount": "3",
      "unassignedCount": "297"
    },
    "subscriptionEndTime": "2027-08-15T12:00:00Z"
  },
  "kioskSignageUpgradeAnnual": {
    "counts": {
      "totalPurchasedCount": "10",
      "assignedCount": "4",
      "unassignedCount": "6"
    },
    "subscriptionEndTime": "2027-08-15T12:00:00Z"
  },
  "chromePerpetualUpgrade": {
    "counts": {
      "totalPurchasedCount": "10",
      "assignedCount": "10",
      "unassignedCount": "0"
    },
    "retiredCount": "2",
    "conditionallyAvailableCount": "2"
  }
}