A Team within a Service Type.
| Property | Value |
|---|---|
| Product | Services (pco.services, API version 2018-11-01) |
| Resource type | Team |
| TypeScript | Services.Team, attributes Services.TeamAttributes, schema Services.TeamSchema |
| Planning Center path | /services/v2/teams |
| Planning Center docs | Team |
How to reach it
| Client path | Returns | Filters | Create |
|---|---|---|---|
pco.services.teams |
Collection | editable, service_types |
Yes |
pco.services.series.id(seriesId).plans.id(planId).needed_positions.id(neededPositionId).team |
Collection | No | |
pco.services.series.id(seriesId).plans.id(planId).signup_teams |
Collection | No | |
pco.services.people.id(personId).plan_people.id(planPersonId).team |
Collection | No | |
pco.services.people.id(personId).schedules.id(scheduleId).team |
Collection | No | |
pco.services.service_types.id(serviceTypeId).teams |
Collection | Yes | |
pco.services.service_types.id(serviceTypeId).plan_times.id(planTimeId).split_team_rehearsal_assignments.id(splitTeamRehearsalAssignmentId).team |
Collection | No | |
pco.services.people.id(personId).team_leaders.id(teamLeaderId).team |
Collection | No | |
pco.services.service_types.id(serviceTypeId).team_positions.id(teamPositionId).team |
Collection | No |
From a collection, .id(teamId) addresses one Team: pco.services.teams.id(teamId). Collections support where, include, order, and pagination; single resources have get().
Attributes
On Services.TeamAttributes. Every resource also has id and type ('Team') next to its attributes.
| Name | Type | Description |
|---|---|---|
archived_at |
string | null |
|
assigned_directly |
boolean | null |
|
created_at |
string | null |
|
default_prepare_notifications |
boolean | null |
|
default_status |
string | null |
|
deleted_at |
string | null |
|
direct_messages_enabled |
boolean | null |
Whether direct messages are enabled for this team in Chat. |
last_plan_from |
string | null |
|
name |
string | null |
|
rehearsal_team |
boolean | null |
|
schedule_to |
string | null |
This determines whether a team is a split team or not.Accepted values: 1. “plan” (default) 2. “time” (designates as a split team) |
secure_team |
boolean | null |
|
sequence |
number | null |
|
stage_color |
string | null |
|
stage_variant |
string | null |
|
updated_at |
string | null |
|
viewers_see |
number | null |
Relationships and includes
Side-load with include() (or get({ include })) and read with related(resource, name): people, person_team_position_assignments, service_types, team_leaders, team_positions.
| Relationship | Type | To | Includable |
|---|---|---|---|
default_responds_to |
To one | Person | No |
service_type |
To one | ServiceType | No |
service_types |
To many | ServiceType | Yes |
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 |
Order
order(...) accepts these fields, ascending, or descending with a - prefix: created_at, name, updated_at.
Filters
filter(...) names depend on the edge you query through:
| Edge | Filters |
|---|---|
pco.services.teams |
editable, service_types |
Edges
Follow these from one Team, ref = pco.services.teams.id(teamId):
| Edge | Leads to | Returns | Filters | Create |
|---|---|---|---|---|
ref.people |
Person | Collection | No | |
ref.person_team_position_assignments |
PersonTeamPositionAssignment | Collection | No | |
ref.service_types |
ServiceType | Collection | No | |
ref.team_leaders |
TeamLeader | Collection | No | |
ref.team_positions |
TeamPosition | Collection | No |
Writing
| Property | Value |
|---|---|
| Create | Yes, create() on pco.services.teams, teams on ServiceType |
| Update | No |
| Delete | No |
Create attributes
Typed as Services.TeamSchema['create'].
| Attribute | Type |
|---|---|
assigned_directly |
boolean | null |
copy_from |
unknown |
copy_team_members |
unknown |
gap_alert_days |
unknown |
gap_alert_enabled |
unknown |
name |
string | null |
rehearsal_team |
boolean | null |
related_teams_ids |
string[] |
schedule_to |
string | null |
secure_team |
boolean | null |
service_type_ids |
string[] |
stage_color |
string | null |
stage_variant |
string | null |
team_leader_ids |
string[] |
See Writing data.
Actions
Run with ref.action(name, body?). Bodies are untyped: see Planning Center’s docs for each action.
| Action | Path | Description |
|---|---|---|
archive |
POST /services/v2/teams/{team_id}/archive |
Archive a Team. |
unarchive |
POST /services/v2/teams/{team_id}/unarchive |
Restore an archived Team. |
Example
import type { Services } from '@mackenly/planningcenterkit';
const page = await pco.services.teams.order('created_at').perPage(25).list();
const items: Services.Team[] = page.data;