You can get a list of all the organisations of a campaign by using the following endpoint.
{warning} Remember that all endpoints documented here need to be prefixed with
1.0/campaigns/{campaign.id}/.
| Method | URI | Headers |
|---|---|---|
| GET/HEAD | organisations |
Default |
The list of returned entities can be filtered. The available filters are available here
{
"data": [
{
"id": 1,
"name": "Tiamat Cultists",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": true,
"entity_id": 5,
"tags": [],
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": 1,
"organisation_id": 4,
"type": "Kingdom",
"is_defunct": true,
"members": [],
"locations": [
67,
66,
65
]
}
]
}
To get the details of a single organisation, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| GET/HEAD | organisations/{organisation.id} |
Default |
{
"data": {
"id": 1,
"name": "Tiamat Cultists",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": true,
"entity_id": 5,
"tags": [],
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": 1,
"organisation_id": 4,
"type": "Kingdom",
"is_defunct": true,
"members": [],
"locations": [
67,
66,
65
]
}
}
To get the members of an organisation, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| GET/HEAD | organisations/{organisation.id}/organisation_members |
Default |
{
"data": {
"character_id": 11,
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": 1,
"id": 6,
"is_private": false,
"organisation_id": 1,
"role": "Leader",
"pin_id": null,
"status_id": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": 1
}
}
{info} Adding (
POST), Updating (PUT,PATCH) and Deleting (DELETE) a member from an organisation can also be done using the same patterns as for other endpoints.
To create an organisation, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| POST | organisations |
Default |
| Parameter | Type | Detail |
|---|---|---|
name |
string (Required) |
Name of the organisation |
entry |
string |
The html description of the organisation |
type |
string |
Type of organisation |
organisation_id |
integer |
The parent organisation |
locations |
array |
Array of location ids |
tags |
array |
Array of tag ids |
is_defunct |
boolean |
If the organisation is defunct |
entity_image_uuid |
string |
Gallery image UUID for the entity image |
entity_header_uuid |
string |
Gallery image UUID for the entity header (premium campaign feature) |
tooltip |
string |
The organisation's tooltip (premium campaign feature) |
is_private |
boolean |
If the organisation is only visible to admin members of the campaign |
{success} Code 200 with JSON body of the new organisation.
To update an organisation, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| PUT/PATCH | organisations/{organisation.id} |
Default |
The same body parameters are available as for when creating an organisation.
{success} Code 200 with JSON body of the updated organisation.
To delete an organisation, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| DELETE | organisations/{organisation.id} |
Default |
{success} Code 200 with JSON.