Items


All Items

You can get a list of all the items of a campaign by using the following endpoint.

{warning} Don't forget that all endpoints documented here need to be prefixed with 1.0/campaigns/{campaign.id}/.

Method URI Headers
GET/HEAD items Default

URL Parameters

The list of returned entities can be filtered. The available filters are available here

Results

{
    "data": [
        {
            "id": 1,
            "name": "Spear",
            "entry": "\n<p>Lorem Ipsum.</p>\n",
            "image": "{path}",
            "image_full": "{url}",
            "image_thumb": "{url}",
            "has_custom_image": false,
            "is_private": true,
            "entity_id": 7,
            "tags": [],
            "created_at":  "2019-01-30T00:01:44.000000Z",
            "created_by": 1,
            "updated_at":  "2019-08-29T13:48:54.000000Z",
            "updated_by": 1,
            "location_id": 4,
            "character_id": 2,
            "type": "Weapon",
            "price": "25 gp",
            "size": "1 lb.",
            "item_id": 2
        }
    ]
}

Item

To get the details of a single item, use the following endpoint.

Method URI Headers
GET/HEAD items/{item.id} Default

Results

{
    "data": {
        "id": 1,
        "name": "Spear",
        "entry": "\n<p>Lorem Ipsum.</p>\n",
        "image": "{path}",
        "image_full": "{url}",
        "image_thumb": "{url}",
        "has_custom_image": false,
        "is_private": true,
        "entity_id": 7,
        "tags": [],
        "created_at":  "2019-01-30T00:01:44.000000Z",
        "created_by": 1,
        "updated_at":  "2019-08-29T13:48:54.000000Z",
        "updated_by": 1,
        "location_id": 4,
        "character_id": 2,
        "type": "Weapon",
        "price": "25 gp",
        "size": "1 lb.",
        "item_id": 2
    }

}

Create a Item

To create a item, use the following endpoint.

Method URI Headers
POST items Default

Body

Parameter Type Detail
name string (Required) Name of the item
entry string The html description of the item
type string The item's type
location_id integer The item's location
character_id integer The item's owner
price string The item's price
size string The item's size
tags array Array of tag ids
is_private boolean If the item is only visible to admin members of the campaign
item_id integer The ID of the item's parent item, if it has one
image_url string URL to a picture to be used for the item
entity_image_uuid string Gallery image UUID for the entity image (limited to superboosted campaigns)
entity_header_uuid string Gallery image UUID for the entity header (limited to superboosted campaigns)

Results

{success} Code 200 with JSON body of the new item.

Update a Item

To update a item, use the following endpoint.

Method URI Headers
PUT/PATCH items/{item.id} Default

Body

The same body parameters are available as for when creating a item.

Results

{success} Code 200 with JSON body of the updated item.

Delete a Item

To delete a item, use the following endpoint.

Method URI Headers
DELETE items/{item.id} Default

Results

{success} Code 200 with JSON.