Skip to content

PersonTeamPositionAssignment (Services)

A person's assignment to a position within a team.

A person’s assignment to a position within a team.

Property Value
Product Services (pco.services, API version 2018-11-01)
Resource type PersonTeamPositionAssignment
TypeScript Services.PersonTeamPositionAssignment, attributes Services.PersonTeamPositionAssignmentAttributes, schema Services.PersonTeamPositionAssignmentSchema
Planning Center path /services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments
Planning Center docs PersonTeamPositionAssignment

How to reach it

Client path Returns Filters Create
pco.services.people.id(personId).person_team_position_assignments Collection not_archived, not_deleted No
pco.services.teams.id(teamId).person_team_position_assignments Collection No
pco.services.service_types.id(serviceTypeId).team_positions.id(teamPositionId).person_team_position_assignments Collection time_preference_options Yes

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

Attributes

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

Name Type Description
created_at string | null
preferred_weeks unknown[] | null See details.
schedule_preference string | null Possible Values: “Unavailable” “Every week” “Every other week” “Every 3rd week” “Every 4th week” “Every 5th week” “Every 6th week” “Once a quarter” “Once a month” “Twice a month” “Three times a month” “Choose Weeks”
updated_at string | null

Attribute details

preferred_weeks

When schedule_preference is set to “Choose Weeks” then this indicates which weeks are preferred (checked).

e.g. [‘1’, ‘3’, ‘5’] to prefer odd numbered weeks.

Relationships and includes

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

Relationship Type To Includable
person To one Person Yes
team_position To one TeamPosition Yes
time_preference_options To many TimePreferenceOption No

Querying

No documented where fields.

Order

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

Filters

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

Edge Filters
person_team_position_assignments on Person not_archived, not_deleted
person_team_position_assignments on TeamPosition time_preference_options

Edges

Follow these from one PersonTeamPositionAssignment, ref = pco.services.people.id(personId).person_team_position_assignments.id(personTeamPositionAssignmentId):

Edge Leads to Returns Filters Create
ref.person Person Collection No
ref.team_position TeamPosition Collection No

Writing

Property Value
Create Yes, create() on person_team_position_assignments on TeamPosition
Update Yes, update() on a reference
Delete Yes, delete() on a reference

Create attributes

Typed as Services.PersonTeamPositionAssignmentSchema['create'].

Attribute Type
person_id string
preferred_weeks unknown[] | null
schedule_preference string | null
time_preference_option_ids string[]

Update attributes

Typed as Services.PersonTeamPositionAssignmentSchema['update'].

Attribute Type
preferred_weeks unknown[] | null
schedule_preference string | null
time_preference_option_ids string[]

See Writing data.

Example

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

const personId = '1'; // Person id

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

Type to search…

↑↓ navigate↵ selectEsc close