You can get a list of all the families of a campaign by using the following endpoint.
{warning} Don't forget that all endpoints documented here need to be prefixed with
api/1.0/campaigns/{campaign.id}/
.
Method | Endpoint | Headers |
---|---|---|
GET/HEAD | families |
Default |
{
"data": [
{
"id": 1,
"name": "Adams",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"is_private": true,
"entity_id": 5,
"tags": [],
"created_at": {
"date": "2017-10-31 10:55:08.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"created_by": 1,
"updated_at": {
"date": "2018-09-20 09:18:58.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_by": 1,
"location_id": 4,
"family_id": 2,
"members": [
"3"
]
}
]
}
To get the details of a single family, use the following endpoint.
Method | Endpoint | Headers |
---|---|---|
GET/HEAD | families/{family.id} |
Default |
{
"data": {
"id": 1,
"name": "Adams",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"is_private": true,
"entity_id": 5,
"tags": [],
"created_at": {
"date": "2017-10-31 10:55:08.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"created_by": 1,
"updated_at": {
"date": "2018-09-20 09:18:58.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_by": 1,
"location_id": 1,
"family_id": 2,
"members": [
"3"
]
}
}
{info} Additional note:
members
represents an array ofcharacters
.id
.
To create a family, use the following endpoint.
Method | Endpoint | Headers |
---|---|---|
POST | families |
Default |
Parameter | Type | Detail |
---|---|---|
name |
string (Required) |
Name of the family |
location_id |
integer |
The family's location id |
family_id |
integer |
The parent family id |
tags |
array |
Array of tag ids |
is_private |
boolean |
If the family is only visible to admin members of the campaign |
image |
stream |
Stream to file uploaded to the family |
image_url |
string |
URL to a picture to be used for the family |
{success} Code 200 with JSON body of the new family.
To update a family, use the following endpoint.
Method | Endpoint | Headers |
---|---|---|
PUT/PATCH | families/{family.id} |
Default |
The same body parameters are available as for when creating a family.
{success} Code 200 with JSON body of the updated family.
To delete a family, use the following endpoint.
Method | Endpoint | Headers |
---|---|---|
DELETE | families/{family.id} |
Default |
{success} Code 200 with JSON.