Membership
The state of a Person belonging to a Group.
A Person can only have one active Membership to a Group at a time.
Example Request
curl https://api.planningcenteronline.com/groups/v2/groups/{group_id}/memberships
Example Object
{
"type": "Membership",
"id": "1",
"attributes": {
"joined_at": "2000-01-01T12:00:00Z",
"role": "string"
},
"relationships": {
"group": {
"data": {
"type": "Group",
"id": "1"
}
},
"person": {
"data": {
"type": "Person",
"id": "1"
}
}
}
}
Attributes
| Name | Type | Description |
|---|---|---|
id |
primary_key |
|
joined_at |
date_time |
The date and time the person joined the group. |
role |
string |
The role of the person in the group.
Possible values: |
Relationships
| Name | Type | Association Type | Note |
|---|---|---|---|
| group | Group | to_one | |
| person | Person | to_one |
Can Include
| Parameter | Value | Description | Assignable |
|---|---|---|---|
| include | person | include associated person |
create and update |
Order By
| Parameter | Value | Type | Description |
|---|---|---|---|
| order | first_name | string | prefix with a hyphen (-first_name) to reverse the order |
| order | joined_at | string | prefix with a hyphen (-joined_at) to reverse the order |
| order | last_name | string | prefix with a hyphen (-last_name) to reverse the order |
| order | role | string | prefix with a hyphen (-role) to reverse the order |
Query By
| Name | Parameter | Type | Description | Example |
|---|---|---|---|---|
| role | where[role] |
string | Query on a specific role |
?where[role]=string |
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 | /groups/v2/groups/{group_id}/memberships |
Reading
| HTTP Method | Endpoint |
|---|---|
| GET | /groups/v2/groups/{group_id}/memberships/{id} |
Creating
| HTTP Method | Endpoint | Assignable Attributes |
|---|---|---|
| POST | /groups/v2/groups/{group_id}/memberships |
|
Updating
| HTTP Method | Endpoint | Assignable Attributes |
|---|---|---|
| PATCH | /groups/v2/groups/{group_id}/memberships/{id} |
|
Deleting
| HTTP Method | Endpoint |
|---|---|
| DELETE | /groups/v2/groups/{group_id}/memberships/{id} |
Associations
| HTTP Method | Endpoint | Returns | Details | Filter By |
|---|---|---|---|---|
| GET | https://api.planningcenteronline.com/groups/v2/groups/{group_id}/memberships/{membership_id}/group |
Group | group for this membership |
|
| GET | https://api.planningcenteronline.com/groups/v2/groups/{group_id}/memberships/{membership_id}/person |
Person |
Belongs To
| HTTP Method | Endpoint | Association | Details | Filter By |
|---|---|---|---|---|
| GET | https://api.planningcenteronline.com/groups/v2/groups/{group_id}/memberships |
Group | memberships belonging to this group |
|
| GET | https://api.planningcenteronline.com/groups/v2/groups/{group_id}/my_membership |
Group | the current person's membership for this group |
|
| GET | https://api.planningcenteronline.com/groups/v2/people/{person_id}/memberships |
Person | memberships for this person |