API
⌘K
My Developer Account

PersonTeamPositionAssignment

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

Example Request

curl https://api.planningcenteronline.com/services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments

View in API Explorer →

Example Object

{
  "type": "PersonTeamPositionAssignment",
  "id": "1",
  "attributes": {
    "created_at": "2000-01-01T12:00:00Z",
    "preferred_weeks": [],
    "schedule_preference": "string",
    "updated_at": "2000-01-01T12:00:00Z"
  },
  "relationships": {
    "person": {
      "data": {
        "type": "Person",
        "id": "1"
      }
    },
    "team_position": {
      "data": {
        "type": "TeamPosition",
        "id": "1"
      }
    },
    "time_preference_options": {
      "data": [
        {
          "type": "TimePreferenceOption",
          "id": "1"
        }
      ]
    }
  }
}

Attributes

Name Type Description
created_at date_time
id primary_key
preferred_weeks array

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.

schedule_preference string

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 date_time

Relationships

Name Type Association Type Note
person Person to_one
team_position TeamPosition to_one
time_preference_options TimePreferenceOption to_many

Can Include

Parameter Value Description Assignable
include person

include associated person

create and update
include team_position

include associated team_position

create and update

Order By

Parameter Value Type Description
order first_name string

prefix with a hyphen (-first_name) to reverse the order

order last_name string

prefix with a hyphen (-last_name) to reverse the order

Pagination

Name Parameter Type Description
per_page per_page integer

how many records to return per page (min=1, max=100, default=25)

offset offset integer

get results from given offset

Endpoints

Listing

HTTP Method Endpoint
GET /services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments

Reading

HTTP Method Endpoint
GET /services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments/{id}

Creating

HTTP Method Endpoint Assignable Attributes
POST /services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments
  • schedule_preference
  • preferred_weeks
  • time_preference_option_ids
  • person_id

Updating

HTTP Method Endpoint Assignable Attributes
PATCH /services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments/{id}
  • schedule_preference
  • preferred_weeks
  • time_preference_option_ids

Deleting

HTTP Method Endpoint
DELETE /services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments/{id}

Associations

HTTP Method Endpoint Returns Details Filter By
GET https://api.planningcenteronline.com/services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments/{person_team_position_assignment_id}/person Person
GET https://api.planningcenteronline.com/services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments/{person_team_position_assignment_id}/team_position TeamPosition

Belongs To

HTTP Method Endpoint Association Details Filter By
GET https://api.planningcenteronline.com/services/v2/people/{person_id}/person_team_position_assignments Person
  • not_archived
  • not_deleted
GET https://api.planningcenteronline.com/services/v2/teams/{team_id}/person_team_position_assignments Team
GET https://api.planningcenteronline.com/services/v2/service_types/{service_type_id}/team_positions/{team_position_id}/person_team_position_assignments TeamPosition
  • time_preference_options

    pass an additional array of time_preference_option_ids as a param to filter to people who prefer those times. use id none to filter people who have no preferred times