---
title: Get Plan & Usage information for all products
slug: feature-experimentation/api/get-plan-and-usage-information-for-all-products
docTags: 
createdAt: 2026-10-01T19:58:02.336Z
---

{
  "id": "yIHekAXbAhWZqcpzQF5JP",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.optimizely.com/v2/plan",
    "servers": [
      {
        "url": "https://api.optimizely.com/v2/plan"
      }
    ],
    "name": "Get Plan & Usage information for all products",
    "description": "<p>Get Plan &#x26; Usage information for all products, only accessible for Administrators on the account</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "apiKey",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        },
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "description": "<p>Write applications that authenticate with the REST API via OAuth 2.0. Or, to authenticate using a personal token, see <a href=\"https://docs.developers.optimizely.com/web/docs/personal-token\" target=\"_blank\">https://docs.developers.optimizely.com/web/docs/personal-token</a></p>",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://app.optimizely.com/oauth2/authorize",
              "tokenUrl": "https://app.optimizely.com/oauth2/token",
              "scopes": {
                "all": "Full access to your account"
              }
            }
          },
          "requiredScopes": [
            "read",
            "write"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Return Plan &#x26; Usage information</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Plan",
            "schema": [
              {
                "name": "account_id",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "<p>The account ID of the account that this Plan &#x26; Usage information is associated with</p>",
                "example": 1234567,
                "format": "int64"
              },
              {
                "name": "plan_name",
                "kind": "optional",
                "type": "string",
                "description": "The name of the plan for the current account",
                "example": "Enterprise - Premium Optimizely X Web"
              },
              {
                "name": "product_usages",
                "kind": "optional",
                "type": "array",
                "description": "Array of products under this account",
                "modelRef": "#/components/schemas/ProductUsage",
                "customType": "ProductUsage[]",
                "schema": [
                  {
                    "name": "allocation_term_in_months",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "<p>The current allocation term length in months. The allocation term is the time between the <code>start_time</code> and the <code>end_time</code>. For example the <code>usage</code> for an account with an <code>allocation_term_in_months</code> of 6 has started accumulating on the <code>start_time</code> and will reset to 0 at <code>end_time</code> (6 months later)</p>",
                    "example": 6,
                    "format": "int64"
                  },
                  {
                    "name": "end_time",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "<p>The end date of the current allocation term period. For monthly paying accounts, the current allocation term period means the current billing month</p>",
                    "format": "date-time"
                  },
                  {
                    "name": "last_update_time",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "<p>The last time that the <code>unit_of_measurement</code> count was updated</p>",
                    "format": "date-time"
                  },
                  {
                    "name": "overage_cents_per_visitor",
                    "kind": "optional",
                    "type": "number<float>",
                    "description": "<p>(optional) The cost in cents for every visitor when the number of <code>unit_of_measurement</code> has exceeded the <code>usage_allowance</code>. This value is only set for accounts with a limited <code>usage_allowance</code></p>",
                    "example": 0.001,
                    "format": "float"
                  },
                  {
                    "name": "product_name",
                    "kind": "optional",
                    "type": "string<Optimizely X AB Testing | Classic AB Testing | Personalization | Mobile | Full Stack | Recommendations | Over The Top | Impressions>",
                    "description": "The product name",
                    "enum": [
                      "Optimizely X AB Testing",
                      "Classic AB Testing",
                      "Personalization",
                      "Mobile",
                      "Full Stack",
                      "Recommendations",
                      "Over The Top",
                      "Impressions"
                    ]
                  },
                  {
                    "name": "projects",
                    "kind": "optional",
                    "type": "map",
                    "description": "<p>Key-value map of <code>usage</code> per project under this account and this product. Keys are project IDs, values are <code>usage</code> numbers. Only available for the Impressions metrics, otherwise omitted.</p>",
                    "example": "",
                    "customType": "map<string, integer>",
                    "schema": []
                  },
                  {
                    "name": "start_time",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "<p>The start date of the current allocation term period. For monthly paying accounts, the current allocation term period means the current billing month</p>",
                    "format": "date-time"
                  },
                  {
                    "name": "usage",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "<p>The total <code>usage</code> in the <code>unit_of_measurement</code> within the current allocation term</p>",
                    "example": 12345,
                    "format": "int64"
                  },
                  {
                    "name": "usage_allowance",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "<p>(optional) The total <code>usage</code> allowed in the <code>unit_of_measurement</code> for the current allocation term. This value is only set for accounts with a limited <code>usage_allowance</code></p>",
                    "example": 123456,
                    "format": "int64"
                  }
                ]
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string<trial | active | inactive>",
                "description": "The status of the plan for the current account",
                "enum": [
                  "trial",
                  "active",
                  "inactive"
                ]
              },
              {
                "name": "unit_of_measurement",
                "kind": "optional",
                "type": "string<Monthly Unique Visitors | Impressions>",
                "description": "<p>The unit by which we measure the <code>usage</code> of this account</p>",
                "enum": [
                  "Monthly Unique Visitors",
                  "Impressions"
                ]
              }
            ],
            "modelRef": "#/components/schemas/Plan",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Invalid credentials",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "<p>You do not have permission to access Plan &#x26; Usage information</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "Unexpected error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "yxT1gvYyKgboHl2TdikHh",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.optimizely.com/v2/plan \\\n     --header 'accept: application/json'"
        },
        {
          "id": "71u1OpyKquOCq6caNDXbN",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.optimizely.com/v2/plan\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "bgkCaM0rxlyWESzi0OurH",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.optimizely.com/v2/plan\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "0GNKvxYiE32mS045NfEdc",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.optimizely.com/v2/plan\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "yxT1gvYyKgboHl2TdikHh"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Return Plan &#x26; Usage information\n{\n  \"account_id\": 1234567,\n  \"plan_name\": \"Enterprise - Premium Optimizely X Web\",\n  \"product_usages\": [\n    {\n      \"allocation_term_in_months\": 6,\n      \"end_time\": \"\",\n      \"last_update_time\": \"\",\n      \"overage_cents_per_visitor\": 0.001,\n      \"product_name\": \"\",\n      \"projects\": \"\",\n      \"start_time\": \"\",\n      \"usage\": 12345,\n      \"usage_allowance\": 123456\n    }\n  ],\n  \"status\": \"\",\n  \"unit_of_measurement\": \"\"\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Invalid credentials\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// You do not have permission to access Plan &#x26; Usage information\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-3-default",
          "language": "default",
          "code": "// Unexpected error\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}