---
title: "ServiceType (Services)"
description: "A Service Type is a container for plans."
---

> 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.

# ServiceType (Services)

A Service Type is a container for plans.

| Property | Value |
| --- | --- |
| Product | [Services](/reference/services/) (`pco.services`, API version `2018-11-01`) |
| Resource type | `ServiceType` |
| TypeScript | `Services.ServiceType`, attributes `Services.ServiceTypeAttributes`, schema `Services.ServiceTypeSchema` |
| Planning Center path | `/services/v2/service_types` |
| Planning Center docs | [ServiceType](https://api.planningcenteronline.com/docs/apps/services/versions/2018-11-01/vertices/service_type) |

## How to reach it

| Client path | Returns | Filters | Create |
| --- | --- | --- | --- |
| `pco.services.service_types` | Collection | `no_parent` | Yes |
| `pco.services.folders.id(folderId).service_types` | Collection |  | Yes |
| `pco.services.series.id(seriesId).plans.id(planId).live.id(liveId).service_type` | Collection |  | No |
| `pco.services.teams.id(teamId).service_types` | Collection |  | No |

From a collection, `.id(serviceTypeId)` addresses one ServiceType: `pco.services.service_types.id(serviceTypeId)`. Collections support [`where`, `include`, `order`, and pagination](/guides/querying/); single resources have `get()`.

## Attributes

On `Services.ServiceTypeAttributes`. Every resource also has `id` and `type` (`'ServiceType'`) next to its attributes.

| Name | Type | Description |
| --- | --- | --- |
| `archived_at` | `string \| null` |  |
| `attachment_types_enabled` | `boolean \| null` |  |
| `background_check_permissions` | `string \| null` |  |
| `comment_permissions` | `string \| null` | DEPRECATED: this attribute will be removed in the next release and will return the string "DEPRECATED" in this version |
| `created_at` | `string \| null` |  |
| `custom_item_types` | `unknown[] \| null` | See [details](#custom-item-types). |
| `deleted_at` | `string \| null` |  |
| `frequency` | `string \| null` |  |
| `last_plan_from` | `string \| null` |  |
| `name` | `string \| null` |  |
| `permissions` | `string \| null` |  |
| `scheduled_publish` | `boolean \| null` |  |
| `sequence` | `number \| null` |  |
| `standard_item_types` | `unknown[] \| null` | See [details](#standard-item-types). |
| `updated_at` | `string \| null` |  |

### Attribute details

#### `custom_item_types` {#custom-item-types}

A array of hashes that maps an item title substring matcher to a color:

[\{ name: "Announcements", color: "#FFFFFF" \}]

Valid substring matchers are any string that could be used as an item title.

A color is the hexadecimal value of a valid color e.g. #FFFFFF
Valid colors values are #e8f6df, #e0f7ff, #e6e2fd, #ffe0e8, #ffedd1, #cfcfcf, #eaebeb, and #ffffff

#### `standard_item_types` {#standard-item-types}

An array of hashes that maps an item type to a color:

[\{ name: "Header", color: "#FFFFFF" \}]

Valid names are Header, Song, and Media.

A color is the hexadecimal value of a valid color e.g. #FFFFFF
Valid colors values are #e8f6df, #e0f7ff, #e6e2fd, #ffe0e8, #ffedd1, #cfcfcf, #eaebeb, and #ffffff

## Relationships and includes

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

| Relationship | Type | To | Includable |
| --- | --- | --- | --- |
| `parent` | To one | [Folder](/reference/services/folder/) | No |

## Querying

### Where

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

| Field | Value type | Operators |
| --- | --- | --- |
| `id` | `string` | Equality only |
| `name` | `string` | Equality only |
| `parent_id` | `string \| number` | Equality only |

### Order

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

### Filters

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

| Edge | Filters |
| --- | --- |
| `pco.services.service_types` | `no_parent` |

## Edges

Follow these from one ServiceType, `ref = pco.services.service_types.id(serviceTypeId)`:

| Edge | Leads to | Returns | Filters | Create |
| --- | --- | --- | --- | --- |
| `ref.attachments` | [Attachment](/reference/services/attachment/) | Collection |  | Yes |
| `ref.item_note_categories` | [ItemNoteCategory](/reference/services/item-note-category/) | Collection |  | No |
| `ref.live_controllers` | [LiveController](/reference/services/live-controller/) | Collection |  | No |
| `ref.plan_note_categories` | [PlanNoteCategory](/reference/services/plan-note-category/) | Collection |  | No |
| `ref.plan_person_times` | [PlanPersonTime](/reference/services/plan-person-time/) | Collection |  | No |
| `ref.plan_templates` | [PlanTemplate](/reference/services/plan-template/) | Collection |  | Yes |
| `ref.plan_times` | [PlanTime](/reference/services/plan-time/) | Collection | `future`, `named`, `not_deleted`, `past` | No |
| `ref.plans` | [Plan](/reference/services/plan/) | Collection | `after`, `before`, `future`, `no_dates`, `past` | Yes |
| `ref.public_view` | [PublicView](/reference/services/public-view/) | Collection |  | No |
| `ref.team_positions` | [TeamPosition](/reference/services/team-position/) | Collection |  | No |
| `ref.teams` | [Team](/reference/services/team/) | Collection |  | Yes |
| `ref.time_preference_options` | [TimePreferenceOption](/reference/services/time-preference-option/) | Collection |  | No |
| `ref.unscoped_plans` | [Plan](/reference/services/plan/) | Collection | `deleted` | No |

## Writing

| Property | Value |
| --- | --- |
| Create | Yes, `create()` on `pco.services.service_types`, `service_types` on [Folder](/reference/services/folder/) |
| Update | Yes, `update()` on a reference |
| Delete | Yes, `delete()` on a reference |

### Create attributes

Typed as `Services.ServiceTypeSchema['create']`.

| Attribute | Type |
| --- | --- |
| `attachment_types_enabled` | `boolean \| null` |
| `background_check_permissions` | `string \| null` |
| `create_teams` | `unknown` |
| `custom_item_types` | `unknown[] \| null` |
| `frequency` | `string \| null` |
| `last_plan_from` | `string \| null` |
| `name` | `string \| null` |
| `parent_id` | `string` |
| `scheduled_publish` | `boolean \| null` |
| `sequence` | `number \| null` |
| `standard_item_types` | `unknown[] \| null` |

### Update attributes

Typed as `Services.ServiceTypeSchema['update']`.

| Attribute | Type |
| --- | --- |
| `attachment_types_enabled` | `boolean \| null` |
| `background_check_permissions` | `string \| null` |
| `create_teams` | `unknown` |
| `custom_item_types` | `unknown[] \| null` |
| `frequency` | `string \| null` |
| `last_plan_from` | `string \| null` |
| `name` | `string \| null` |
| `parent_id` | `string` |
| `scheduled_publish` | `boolean \| null` |
| `sequence` | `number \| null` |
| `standard_item_types` | `unknown[] \| 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 |
| --- | --- | --- |
| `create_plans` | `POST /services/v2/service_types/{service_type_id}/create_plans` | Create multiple plans |

## Example

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

const page = await pco.services.service_types.order('name').perPage(25).list();
const items: Services.ServiceType[] = page.data;
```

Source: https://planningcenterkit.mackenly.com/reference/services/service-type/index.mdx
