Skip to content

Schedule (Services)

An instance of a PlanPerson with included data for displaying in a user's schedule

An instance of a PlanPerson with included data for displaying in a user’s schedule

Property Value
Product Services (pco.services, API version 2018-11-01)
Resource type Schedule
TypeScript Services.Schedule, attributes Services.ScheduleAttributes, schema Services.ScheduleSchema
Planning Center path /services/v2/people/{person_id}/schedules
Planning Center docs Schedule

How to reach it

Client path Returns Filters Create
pco.services.people.id(personId).schedules Collection after, all, before, future, not_across_organizations, past, with_declined No
pco.services.series.id(seriesId).plans.id(planId).my_schedules Collection No

From a collection, .id(scheduleId) addresses one Schedule: pco.services.people.id(personId).schedules.id(scheduleId). Collections support where, include, order, and pagination; single resources have get().

Attributes

On Services.ScheduleAttributes. Every resource also has id and type ('Schedule') next to its attributes.

Name Type Description
can_accept_partial boolean | null
can_accept_partial_one_time boolean | null
can_rehearse boolean | null
dates string | null
decline_reason string | null
organization_name string | null
organization_time_zone string | null
organization_twenty_four_hour_time string | null
person_name string | null
plan_visible boolean | null True if the scheduled Plan is visible to the scheduled Person
plan_visible_to_me boolean | null True if the scheduled Plan is visible to the current Person
position_display_times string | null
reschedule_declines string | null
responds_to_name string | null
service_type_name string | null
short_dates string | null
sort_date string | null
status string | null
team_name string | null
team_position_name string | null

Relationships and includes

Side-load with include() (or get({ include })) and read with related(resource, name): plan_times.

Relationship Type To Includable
organization To one Organization No
person To one Person No
plan To one Plan No
plan_person To one PlanPerson No
responds_to_person To one Person No
service_type To one ServiceType No
team To one Team No
times To many PlanTime No

Querying

Where

where(field, value) for equality; where(field, op, value) with the operators listed.

Field Value type Operators
plan_id string | number Equality only

Order

order(...) accepts these fields, ascending, or descending with a - prefix: starts_at.

Filters

filter(...) names depend on the edge you query through:

Edge Filters
schedules on Person after, all, before, future, not_across_organizations, past, with_declined

Edges

Follow these from one Schedule, ref = pco.services.people.id(personId).schedules.id(scheduleId):

Edge Leads to Returns Filters Create
ref.declined_plan_times PlanTime Collection No
ref.plan_times PlanTime Collection No
ref.team Team Collection No

Writing

Property Value
Create No
Update No
Delete No

Actions

Run with ref.action(name, body?). Bodies are untyped: see Planning Center’s docs for each action.

Action Path Description
accept POST /services/v2/people/{person_id}/schedules/{schedule_id}/accept Accept a Schedule
decline POST /services/v2/people/{person_id}/schedules/{schedule_id}/decline Decline a Schedule

Example

import type { Services } from '@mackenly/planningcenterkit';

const personId = '1'; // Person id

const page = await pco.services.people.id(personId).schedules.order('starts_at').perPage(25).list();
const items: Services.Schedule[] = page.data;

Type to search…

↑↓ navigate↵ selectEsc close