With the /TemplateCategory endpoint user can manage the database template categories.
GET
/api/TemplateCategory/GetTemplateCategories
Get all template categories.
Request Example
/api/TemplateCategory/GetTemplateCategories
Response Example
[
{
"Name": "Category 1",
"CompanyId": 12,
"Id": 1
},
{
"Name": "Category 2",
"CompanyId": 12,
"Id": 2
},
{
"Name": "Category 3",
"CompanyId": 12,
"Id": 3
},
]
GET
/api/TemplateCategory/Get
Get a templateCategory
Request Example
/api/TemplateCategory/Get?id=templateCategoryId&name=templateCategoryName
Use id parameter to get templateCategory by id or
Use name parameter to get templateCategory by name
RESPONSE EXAMPLE
If found, a templateCategory is returned with status code 200. Otherwise an error with code and message is returned with status code 404
{
"Id": "string",
"Name": "string"
}
POST
/api/TemplateCategory/Create
Create a templateCategory
Model Request Example
{
"Name": "string"
}
Response Example
If the operation is successful a templateCategory will be returned with status code 201
Otherwise an error with code and message will be returned with status code 409
PUT
/api/TemplateCategory/Update
Update a templateCategory
Request Example
/api/TemplateCategory/Update?id=templateCategoryId&name=templateCategoryName
Use id parameter to identify the templateCategory to update by id or
Use name parameter to identify the templateCategory to update by name
Model Request Example
All fields are updated
{
"Name": "string"
}
Response Example
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409
DELETE
/api/TemplateCategory/Delete
Delete a templateCategory
Request Example
/api/TemplateCategory/Delete?id=templateCategoryId&name=templateCategoryName
Use id parameter to identify the templateCategory to update by id or
Use name parameter to identify the templateCategory to delete by name
Response Example
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409