Plans

Get Plan

Retrieve a specific plan by version ID (pln_) or by stable plan ID (pln_stable_). When using stable ID with isStableId=true, returns all versions of that plan ordered by version number. When using version ID, returns only that specific version. Use includeFeatures to get associated feature details.

GET
/plans/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Use your secret API key as the bearer token

In: header

Path Parameters

id*string

Plan version ID (pln_) or stable plan ID (pln_stable_)

Query Parameters

includeFeatures?string

Include associated features with feature values and metadata

Default"false"
Value in"true" | "false"
isStableId?string

Set to true if the id parameter is a stable plan ID (returns all versions)

Default"false"
Value in"true" | "false"

Response Body

application/json

application/json

application/json

curl -X GET "https://api.getlumen.dev/v1/plans/pln_01hrwzqrz4ytkwv07syv8k7g3z"

{
  "plans": [
    {
      "id": "pln_01hrwzqrz4ytkwv07syv8k7g3z",
      "stablePlanId": "pln_stable_abc123",
      "merchantId": "mrc_01hptv3p6xj173pfv96pxd5pke",
      "versionNumber": 2,
      "planName": "Pro Plan",
      "planDescription": "Advanced features for growing teams",
      "commitMessage": "Added new API limits feature",
      "isTrialPlan": false,
      "createdAt": "2024-12-15T10:00:00.000Z",
      "deletedAt": null
    }
  ]
}

{
  "error": "Plan not found or access denied"
}
{
  "error": "Failed to fetch plan"
}