---
title: "PersonTeamPositionAssignment (Services)"
description: "A person's assignment to a position within a team."
---

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

# PersonTeamPositionAssignment (Services)

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

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

## 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](/guides/querying/); 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](#preferred-weeks). |
| `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` {#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](/reference/services/person/) | Yes |
| `team_position` | To one | [TeamPosition](/reference/services/team-position/) | Yes |
| `time_preference_options` | To many | [TimePreferenceOption](/reference/services/time-preference-option/) | 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](/reference/services/person/) | `not_archived`, `not_deleted` |
| `person_team_position_assignments` on [TeamPosition](/reference/services/team-position/) | `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](/reference/services/person/) | Collection |  | No |
| `ref.team_position` | [TeamPosition](/reference/services/team-position/) | Collection |  | No |

## Writing

| Property | Value |
| --- | --- |
| Create | Yes, `create()` on `person_team_position_assignments` on [TeamPosition](/reference/services/team-position/) |
| 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](/guides/writing-data/).

## Example

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

Source: https://planningcenterkit.mackenly.com/reference/services/person-team-position-assignment/index.mdx
