API Sections Resource types Resource type Resources Resource Item (Allocated expense) - GET Item categories Item category
Item subcategories - POST
Assign a subcategory to an item category. An item category can have one subcategory assigned. This endpoint is only supported for the allocated expense item type, game items cannot have subcategories assigned.
Request
URL : /v3/resource-types/{resource_type_id}/resources/{resource_id}/items/{item_id}/categories/{item_category_id}/subcategories
Method : POST
Fields :
| Name | Type | Required | Description |
|---|---|---|---|
| subcategory_id | string | Yes | The subcategory to assign, must belong to the item category's category |
Responses
Success
Code : 201
Content :
{
"id": "OwAnNrnBvj",
"subcategory": {
"id": "bqNzrjz1W5",
"name": "Education",
"description": "The essentials that are required by a compulsory education."
},
"created": "2019-04-07 11:26:10"
}
Not authourised
Code : 403
Content :
{
"message": "The requested `Assigned Category` does not exist or is not accessible with your permissions."
}
Assignment limit reached
Code : 400
Content :
{
"message": "Unable to handle your request, the number of allowable subcategory assignments reached",
"limit": 1
}
Not supported
Code : 405
Content :
{
"message": "The requested route is not supported for the item type"
}
Validation error
Code : 422
Content :
{
"message": "Validation error.",
"fields": {
"subcategory_id": {
"errors": [
"The subcategory id field is required or the provided value could not be decoded"
]
}
}
}