> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Plans

Retrieves a paginated list of plans with optional filtering and sorting.

## Query

<CodeGroup>
  ```graphql Query theme={null}
  query ListPlans(
    $filter: PlanFilter
    $paging: CursorPaging
    $sorting: [PlanSort!]
  ) {
    plans(filter: $filter, paging: $paging, sorting: $sorting) {
      edges {
        node {
          refId
          displayName
          description
          status
          pricingType
          versionNumber
          basePlan {
            refId
          }
          product {
            refId
            displayName
          }
          prices {
            billingModel
            billingPeriod
            price {
              amount
              currency
            }
          }
          packageEntitlements {
            ... on PackageEntitlement {
              feature {
                refId
                displayName
                featureType
              }
              hasUnlimitedUsage
              usageLimit
            }
          }
        }
        cursor
      }
      pageInfo {
        hasNextPage
        endCursor
      }
      totalCount
    }
  }
  ```

  ```json Variables theme={null}
  {
    "filter": {
      "status": { "eq": "PUBLISHED" },
      "isLatest": { "is": true }
    },
    "paging": {
      "first": 20
    }
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "plans": {
        "edges": [
          {
            "node": {
              "refId": "plan-pro",
              "displayName": "Pro Plan",
              "description": "For growing teams",
              "status": "PUBLISHED",
              "pricingType": "PAID",
              "versionNumber": 3,
              "basePlan": null,
              "product": {
                "refId": "product-main",
                "displayName": "Main Product"
              },
              "prices": [
                {
                  "billingModel": "FLAT_FEE",
                  "billingPeriod": "MONTHLY",
                  "price": {
                    "amount": 99,
                    "currency": "USD"
                  }
                }
              ],
              "packageEntitlements": [
                {
                  "feature": {
                    "refId": "feature-api-calls",
                    "displayName": "API Calls",
                    "featureType": "NUMBER"
                  },
                  "hasUnlimitedUsage": false,
                  "usageLimit": 10000
                }
              ]
            },
            "cursor": "abc123"
          }
        ],
        "pageInfo": {
          "hasNextPage": false,
          "endCursor": "abc123"
        },
        "totalCount": 5
      }
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="filter" type="PlanFilter">
  Filter criteria for plans

  <Expandable title="properties">
    <ParamField body="refId" type="StringFieldComparison">
      Filter by plan reference ID
    </ParamField>

    <ParamField body="status" type="PackageStatusFilterComparison">
      Filter by status: DRAFT, PUBLISHED, ARCHIVED
    </ParamField>

    <ParamField body="pricingType" type="PricingTypeFilterComparison">
      Filter by pricing type: FREE, PAID, CUSTOM
    </ParamField>

    <ParamField body="isLatest" type="BooleanFieldComparison">
      Filter to only latest versions
    </ParamField>

    <ParamField body="productId" type="StringFieldComparison">
      Filter by product ID
    </ParamField>

    <ParamField body="billingId" type="StringFieldComparison">
      Filter by billing provider ID
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="paging" type="CursorPaging">
  Pagination options
</ParamField>

<ParamField body="sorting" type="[PlanSort]">
  Sorting options with fields: `createdAt`, `displayName`, `refId`, `status`
</ParamField>

## Return Type

Returns a `PlanConnection` with plan objects containing:

| Field                 | Type                  | Description                 |
| --------------------- | --------------------- | --------------------------- |
| `refId`               | String                | Plan reference ID           |
| `displayName`         | String                | Display name                |
| `description`         | String                | Plan description            |
| `status`              | PackageStatus         | DRAFT, PUBLISHED, ARCHIVED  |
| `pricingType`         | PricingType           | FREE, PAID, CUSTOM          |
| `versionNumber`       | Int                   | Current version             |
| `basePlan`            | Plan                  | Parent plan (if inheriting) |
| `product`             | Product               | Associated product          |
| `prices`              | \[Price]              | Plan pricing                |
| `packageEntitlements` | \[PackageEntitlement] | Included entitlements       |
| `compatibleAddons`    | \[Addon]              | Compatible addons           |

## Common Use Cases

<AccordionGroup>
  <Accordion title="Build pricing page">
    Fetch all published plans to display on a pricing page.
  </Accordion>

  <Accordion title="Admin catalog management">
    List all plans including drafts for admin interfaces.
  </Accordion>

  <Accordion title="Plan comparison">
    Query plans to build feature comparison tables.
  </Accordion>
</AccordionGroup>

## Related Operations

* [Get Plan](/api-and-sdks/api-reference/queries/get-plan) - Get single plan by ID
* [Paywall](/api-and-sdks/api-reference/queries/paywall) - Get formatted paywall data
* [Create Plan](/api-and-sdks/api-reference/mutations/create-plan) - Create new plan
