# Get account (tenant) plans Retrieve a paginated list of plans for a specific account (tenant) with filtering, search, and sorting capabilities. Search by name, sort by name or creation date, and optionally exclude non-entitled plans. Endpoint: GET /resources/plans/v1/tenant/{tenantId} Security: bearer ## Path parameters: - `tenantId` (string, required) ## Query parameters: - `offset` (number) Page offset of the results to return Example: "0" - `limit` (number) Number of results per page Example: "10" - `filter` (string) Search input, searchable by name Example: "search-text" - `orderBy` (string) Field to order results by create date (createdAt) or expiration date (expirationDate) Enum: "name", "createdAt" - `sortType` (string) Sort type, ASC for ascending, DESC for descending Enum: "ASC", "DESC" - `excludeNonEntitledPlans` (boolean) Boolean value to include related entities in the response ## Response 200 fields (application/json): - `items` (array) - `items.id` (string, required) UUID string that represents the plan ID Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3" - `items.vendorId` (string, required) UUID string that represents the vendor ID Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3" - `items.name` (string, required) String that represents the plan name Example: "Test Plan" - `items.defaultTreatment` (string) Enum that represents the default treatment Enum: "true", "false" - `items.rules` (array) Array of rules that represents the set of conditions targeting the plan - `items.rules.description` (string, required) String that represents the description of the rule Example: "This is the first rule" - `items.rules.conditionLogic` (string, required) Enum that represents the rule conditions logic Enum: "and" - `items.rules.conditions` (array, required) Array of conditions - `items.rules.conditions.attribute` (string, required) String representing an attribute with a subset of condition(s) that is used in code to enact targeting rules Example: "myCustomAttribute" - `items.rules.conditions.attributeType` (string, required) Enum that represents the attribute type (frontegg or custom) Enum: "custom", "frontegg" - `items.rules.conditions.negate` (boolean, required) Boolean that indicates whether the condition should negate the operation - `items.rules.conditions.op` (string, required) Enum that represents the operation applied to the condition Enum: "in_list", "starts_with", "ends_with", "contains", "matches", "equal", "greater_than", "greater_than_equal", "lower_than", "lower_than_equal", "between_numeric", "is", "on", "between_date", "on_or_after", "on_or_before" - `items.rules.conditions.value` (object, required) Object that contains the condition data according to selected operation, each operation requires different structure (see [documentation](https://docs.frontegg.com/docs/entitlements-backend-sdk#operations-and-corresponding-object-structure)) Example: {"list":["valueA","valueB"]} - `items.rules.treatment` (string, required) String that represents the treatment for this rule Enum: "true", "false" - `items.description` (string) Feature plan description Example: "This is a test plan" - `items.metadata` (object) JSON String Example: "{ \"some-key\": \"some-value\" }" - `items.defaultTimeLimitation` (number) Number that represents the default time limitation in days for auto-assigned plans Example: "30" - `items.assignOnSignup` (boolean, required) Boolean indicating whether a plan is assigned automatically upon signup Example: "true" - `items.createdAt` (string, required) Date when plan was created Example: "2022-01-01T00:00:00" - `items.updatedAt` (string) Date when plan was last updated Example: "2022-01-01T00:00:00" - `items.features` (object) List of features linked to a plan - `items.features.id` (string, required) UUID string representing the feature ID Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3" - `items.features.name` (string, required) String representing the feature name Example: "Test Feature" - `items.features.key` (string, required) String representing the feature key Example: "test-feature" - `items.features.permissions` (array, required) Array of permissions linked to a feature Example: ["permission.read","permission.write"] - `items.entitlements` (object) List of features linked to a plan - `items.entitlements.id` (string, required) UUID string that represents the entitlement ID Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3" - `items.entitlements.planId` (string, required) UUID string that represents the plan ID Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3" - `items.entitlements.tenantId` (string, required) UUID string that represents the account (tenant) ID Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3" - `items.entitlements.userId` (string) UUID string that represents the user ID Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3" - `items.entitlements.expirationDate` (string) Date of entitlement expiration Example: "2022-01-01T12:00:00" - `items.entitlements.createdAt` (string, required) Date when entitlement was created Example: "2022-01-01T12:00:00" - `items.entitlements.updatedAt` (string) Date when entitlement was last updated Example: "2022-01-01T12:00:00" - `items.entitlements.plan` (object, required) Get the related plan object of the entitlement, in case withRelations is set to true - `hasNext` (boolean)