Skip to main content
GET
/
v1
/
plans
/
{id}
Get Plan
curl --request GET \
  --url https://api.example.com/v1/plans/{id}
{
  "id": "<string>",
  "name": "<string>",
  "lookup_key": "<string>",
  "description": "<string>",
  "display_order": 123,
  "metadata": {},
  "environment_id": "<string>",
  "tenant_id": "<string>",
  "status": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "created_by": "<string>",
  "updated_by": "<string>",
  "prices": [
    {}
  ],
  "entitlements": [
    {}
  ],
  "credit_grants": [
    {}
  ]
}

Path Parameters

id
string
required
Unique identifier of the plan.Example: "plan_a1b2c3d4e5f6g7h8i9j0"

Response

id
string
Unique identifier for the plan.
name
string
Human-readable name for the plan.
lookup_key
string
Unique lookup key.
description
string
Description of the plan.
display_order
integer
Display order for the plan.
metadata
object
Custom metadata.
environment_id
string
Environment ID where the plan exists.
tenant_id
string
Tenant ID that owns this plan.
status
string
Status of the plan.Values: "published", "draft", "archived"
created_at
string
ISO 8601 timestamp when the plan was created.
updated_at
string
ISO 8601 timestamp when the plan was last updated.
created_by
string
ID of the user who created the plan.
updated_by
string
ID of the user who last updated the plan.
prices
array
Array of prices associated with this plan.
entitlements
array
Array of entitlements associated with this plan.
credit_grants
array
Array of credit grants associated with this plan.

Example Request

cURL
curl --request GET \
  --url https://api.flexprice.io/v1/plans/plan_a1b2c3d4e5f6g7h8i9j0 \
  --header 'Authorization: Bearer <token>'

Example Response

{
  "id": "plan_a1b2c3d4e5f6g7h8i9j0",
  "name": "Pro Plan",
  "lookup_key": "pro-monthly",
  "description": "Professional tier with advanced features",
  "display_order": 2,
  "metadata": {
    "tier": "professional",
    "recommended": "true"
  },
  "environment_id": "env_123",
  "tenant_id": "tenant_123",
  "status": "published",
  "created_at": "2024-03-20T15:04:05Z",
  "updated_at": "2024-03-20T15:04:05Z",
  "created_by": "user_456",
  "updated_by": "user_456",
  "prices": [
    {
      "id": "price_xyz123",
      "amount": "99.00",
      "currency": "usd",
      "type": "RECURRING"
    }
  ],
  "entitlements": [
    {
      "id": "ent_abc123",
      "feature_id": "feat_api_calls",
      "usage_limit": 10000
    }
  ],
  "credit_grants": []
}