Skip to content

PlanTemplate (Services)

A PlanTemplate Resource

A PlanTemplate Resource

Property Value
Product Services (pco.services, API version 2018-11-01)
Resource type PlanTemplate
TypeScript Services.PlanTemplate, attributes Services.PlanTemplateAttributes, schema Services.PlanTemplateSchema
Planning Center path /services/v2/service_types/{service_type_id}/plan_templates
Planning Center docs PlanTemplate

How to reach it

Client path Returns Filters Create
pco.services.service_types.id(serviceTypeId).plan_templates Collection Yes

From a collection, .id(planTemplateId) addresses one PlanTemplate: pco.services.service_types.id(serviceTypeId).plan_templates.id(planTemplateId). Collections support where, include, order, and pagination; single resources have get().

Attributes

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

Name Type Description
can_view_order boolean | null
created_at string | null
item_count number | null
multi_day boolean | null
name string | null
note_count number | null
prefers_order_view boolean | null
rehearsable boolean | null
team_count number | null
updated_at string | null

Relationships and includes

Planning Center documents no includes for this resource.

Relationship Type To Includable
created_by To one Person No
service_type To one ServiceType No
updated_by To one Person No

Querying

No documented where fields.

Order

order(...) accepts these fields, ascending, or descending with a - prefix: created_at, item_count, name, note_count, team_count, updated_at.

Edges

Follow these from one PlanTemplate, ref = pco.services.service_types.id(serviceTypeId).plan_templates.id(planTemplateId):

Edge Leads to Returns Filters Create
ref.items Item Collection Yes
ref.notes PlanNote Collection Yes
ref.team_members PlanPerson Collection confirmed, not_archived, not_declined, not_deleted Yes

Writing

Property Value
Create Yes, create() on plan_templates on ServiceType
Update Yes, update() on a reference
Delete Yes, delete() on a reference

Create attributes

Typed as Services.PlanTemplateSchema['create'].

Attribute Type
name string | null

Update attributes

Typed as Services.PlanTemplateSchema['update'].

Attribute Type
name string | null

See Writing data.

Actions

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

Action Path Description
import POST /services/v2/service_types/{service_type_id}/plan_templates/{plan_template_id}/import Apply a Plan or PlanTemplate to this PlanTemplate
item_reorder POST /services/v2/service_types/{service_type_id}/plan_templates/{plan_template_id}/item_reorder Reorder plan template items in one request.

Example

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

const serviceTypeId = '1'; // ServiceType id

const page = await pco.services.service_types.id(serviceTypeId).plan_templates.order('created_at').perPage(25).list();
const items: Services.PlanTemplate[] = page.data;

Type to search…

↑↓ navigate↵ selectEsc close