You can get a list of all objects of an entity's inventory 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 | entities/{entity.id}/inventory |
Default |
{
"data": [
{
"id": 1,
"entity_id": 34,
"item_id": 12,
"amount": 3,
"is_equipped": false,
"is_private": false,
"item": {},
"name": null,
"position": "hand",
"visibility": "all"
}
]
}
To create an inventory, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | entities/{entity.id}/inventory |
Default |
Parameter | Type | Detail |
---|---|---|
entity_id |
integer (Required) |
The inventory's parent entity |
item_id |
integer (Required without name ) |
The inventory's object id |
name |
string (Required without item_id ) |
The inventory's object name |
amount |
string (Required) |
The amount of times the object is in the inventory |
position |
string |
Where the object is being stored |
visiblity |
string |
all , admin , self Who can view |
is_equipped |
boolean |
If the object is equipped |
{success} Code 200 with JSON body of the new inventory.
To update an inventory, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | entities/{entity.id}/inventory/{entity.inventory.id} |
Default |
The same body parameters are available as for when creating an inventory.
{success} Code 200 with JSON body of the updated inventory.
To delete an inventory, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | entities/{entity.id}/entity_inventory/{entity.inventory.id} |
Default |
{success} Code 200 with JSON.