Skip to main content
Retrieves a paginated list of plans with optional filtering and sorting.

Query

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
  }
}
{
  "filter": {
    "status": { "eq": "PUBLISHED" },
    "isLatest": { "is": true }
  },
  "paging": {
    "first": 20
  }
}
{
  "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
    }
  }
}

Parameters

filter
PlanFilter
Filter criteria for plans
paging
CursorPaging
Pagination options
sorting
[PlanSort]
Sorting options with fields: createdAt, displayName, refId, status

Return Type

Returns a PlanConnection with plan objects containing:
FieldTypeDescription
refIdStringPlan reference ID
displayNameStringDisplay name
descriptionStringPlan description
statusPackageStatusDRAFT, PUBLISHED, ARCHIVED
pricingTypePricingTypeFREE, PAID, CUSTOM
versionNumberIntCurrent version
basePlanPlanParent plan (if inheriting)
productProductAssociated product
prices[Price]Plan pricing
packageEntitlements[PackageEntitlement]Included entitlements
compatibleAddons[Addon]Compatible addons

Common Use Cases

Fetch all published plans to display on a pricing page.
List all plans including drafts for admin interfaces.
Query plans to build feature comparison tables.