---
title: "PlanTemplate (Services)"
description: "A PlanTemplate Resource"
---

> Documentation Index
> Fetch the complete documentation index at: https://planningcenterkit.mackenly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PlanTemplate (Services)

A PlanTemplate Resource

| Property | Value |
| --- | --- |
| Product | [Services](/reference/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](https://api.planningcenteronline.com/docs/apps/services/versions/2018-11-01/vertices/plan_template) |

## 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](/guides/querying/); 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](/reference/services/person/) | No |
| `service_type` | To one | [ServiceType](/reference/services/service-type/) | No |
| `updated_by` | To one | [Person](/reference/services/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](/reference/services/item/) | Collection |  | Yes |
| `ref.notes` | [PlanNote](/reference/services/plan-note/) | Collection |  | Yes |
| `ref.team_members` | [PlanPerson](/reference/services/plan-person/) | Collection | `confirmed`, `not_archived`, `not_declined`, `not_deleted` | Yes |

## Writing

| Property | Value |
| --- | --- |
| Create | Yes, `create()` on `plan_templates` on [ServiceType](/reference/services/service-type/) |
| 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](/guides/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

```ts
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;
```

Source: https://planningcenterkit.mackenly.com/reference/services/plan-template/index.mdx
