Skip to content

List organization plans

client.plans.list(PlanListParams { limit, page } query?, RequestOptionsoptions?): PageNumberPage<PlanListResponse { id, name } >
GET/v1/plans

Returns a paginated list of benefit plans linked to the authenticated organization.

ParametersExpand Collapse
query: PlanListParams { limit, page }
limit?: number

Items per page (default: 20, max: 100)

minimum1
maximum100
page?: number

Page number (default: 1)

minimum1
ReturnsExpand Collapse
PlanListResponse { id, name }
id: string
name: string

List organization plans

import VitableConnect from '@vitable-inc/vitable-connect';

const client = new VitableConnect({
  apiKey: process.env['VITABLE_CONNECT_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const planListResponse of client.plans.list()) {
  console.log(planListResponse.id);
}
{
  "data": [
    {
      "id": "pln_abc123def456",
      "name": "Basic Care"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "total_pages": 1
  }
}
Returns Examples
{
  "data": [
    {
      "id": "pln_abc123def456",
      "name": "Basic Care"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "total_pages": 1
  }
}