Skip to main content

Get Plan (v1)

Get a single plan by ID.

Method & Path

GET /v1/admin/plans/:planId

Description

Retrieves detailed information about a specific subscription plan.

Authentication

Required: Admin authentication with plans.manage permission.

Path Parameters

ParameterTypeRequiredDescription
planIdstringYesThe plan ID

Response 200 OK

{
"plan": {
"id": "507f1f77bcf86cd799439011",
"name": "Pro Plan",
"slug": "pro-plan",
"description": "Professional plan with advanced features",
"isActive": true,
"sortOrder": 1,
"trialPeriodDays": 14,
"pricePeriods": [
{
"period": "monthly",
"amountCents": 9900,
"currencyCode": "USD"
},
{
"period": "quarterly",
"amountCents": 27000,
"currencyCode": "USD"
},
{
"period": "semiannual",
"amountCents": 54000,
"currencyCode": "USD"
},
{
"period": "annual",
"amountCents": 99000,
"currencyCode": "USD"
}
],
"features": [
{
"key": "unlimited-clients",
"translations": [
{
"locale": "en",
"label": "Unlimited Clients",
"description": "Add as many clients as you need"
},
{
"locale": "ar",
"label": "عملاء غير محدودين",
"description": "أضف عدد العملاء الذي تحتاجه"
}
]
}
],
"flags": [
{
"key": "max-staff",
"value": "50"
}
],
"translations": [
{
"locale": "en",
"name": "Pro Plan",
"description": "Professional plan with advanced features",
"logoImage": null,
"bannerImage": null
}
],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}

Response Fields

FieldTypeDescription
idstringPlan unique identifier
namestringPlan name
slugstringPlan unique slug
descriptionstring|nullPlan description
isActivebooleanWhether plan is active
sortOrdernumberSort order for display
trialPeriodDaysnumber|nullTrial period in days
pricePeriodsarrayArray of price periods with different billing cycles
pricePeriods[].periodstringBilling period: "monthly", "quarterly", "semiannual", or "annual"
pricePeriods[].amountCentsnumberPrice in cents
pricePeriods[].currencyCodestringISO 4217 currency code
featuresarrayPlan features with translations
flagsarrayPlan configuration flags
translationsarrayLocalized plan information
createdAtstringCreation timestamp (ISO 8601)
updatedAtstringLast update timestamp (ISO 8601)

Common Errors

  • 401 Unauthorized: Missing or invalid admin authentication token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Plan not found
  • 500 Internal Server Error: Server error