Tag
Tags are used to filter groups. They can be organized into tag_groups.
Example Request
curl https://api.planningcenteronline.com/groups/v2/groups/{group_id}/tags
Example Object
{
"type": "Tag",
"id": "1",
"attributes": {
"name": "string",
"position": 1
},
"relationships": {
"tag_group": {
"data": {
"type": "TagGroup",
"id": "1"
}
}
}
}
Attributes
| Name | Type | Description |
|---|---|---|
id |
primary_key |
|
name |
string |
The name of the tag |
position |
integer |
The position of the tag in relation to other tags |
Relationships
| Name | Type | Association Type | Note |
|---|---|---|---|
| tag_group | TagGroup | to_one |
Order By
| Parameter | Value | Type | Description |
|---|---|---|---|
| order | name | string | prefix with a hyphen (-name) to reverse the order |
| order | position | string | prefix with a hyphen (-position) to reverse the order |
Query By
| Name | Parameter | Type | Description | Example |
|---|---|---|---|---|
| id | where[id] |
primary_key | Query on a specific id |
?where[id]=primary_key |
| name | where[name] |
string | Query on a specific name |
?where[name]=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}/tags |
Reading
| HTTP Method | Endpoint |
|---|---|
| GET | /groups/v2/groups/{group_id}/tags/{id} |
Associations
| HTTP Method | Endpoint | Returns | Details | Filter By |
|---|---|---|---|---|
| GET | https://api.planningcenteronline.com/groups/v2/groups/{group_id}/tags/{tag_id}/groups |
Group | groups which have applied this tag |
Belongs To
| HTTP Method | Endpoint | Association | Details | Filter By |
|---|---|---|---|---|
| GET | https://api.planningcenteronline.com/groups/v2/groups/{group_id}/tags |
Group | tags assigned to this group |
|
| GET | https://api.planningcenteronline.com/groups/v2/tag_groups/{tag_group_id}/tags |
TagGroup | tags belonging to this tag group |