Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

List

List plans
client.v1.plans.list(PlanListParamsquery?, RequestOptionsoptions?): CursorPage<idstringdescriptionstringnamestringcustom_fieldsRecord<string, string>PlanListResponse>
get/v1/plans

List all available plans.

Parameters
querylimitnumbernext_pagestringPlanListParams
Hide ParametersShow Parameters
limitnumber
optional

Max number of results that should be returned

minimum1
maximum100
next_pagestring
optional

Cursor that indicates where the next page of results should start.

Returns
PlanListResponse
Hide ParametersShow Parameters
idstring
formatuuid
descriptionstring
namestring
custom_fieldsRecord<string, string>
optional
import Metronome from '@metronome/sdk';

const client = new Metronome({
  bearerToken: 'My Bearer Token',
});

// Automatically fetches more pages as needed.
for await (const planListResponse of client.v1.plans.list()) {
  console.log(planListResponse.id);
}
200 Example
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "description": "description",
      "name": "name",
      "custom_fields": {
        "foo": "string"
      }
    }
  ],
  "next_page": "next_page"
}