Zurück zur Übersicht » REST - Category - CategoryType

REST - Category - CategoryType

REST-Interface

Get categorytype by id

URL
GET <application-url>/api/category/type/<categoryTypeId>

Path parameter

Query parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.CategoryType

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/category/type/2?languageKey=de


Get categorytypes

URL
GET <application-url>/api/category/type

Query parameter

Produces

application/json
application/xml

List<com.matterial.mtr.api.object.CategoryType>

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/category/type?languageKey=de


Create categorytype

URL
POST <application-url>/api/category/type

Query parameter

Consumes

application/json
application/xml

com.matterial.mtr.api.object.CategoryType

Produces

application/json
application/xml

com.matterial.mtr.api.object.CategoryType (id only)

Permission
EDIT_CATEGORY

Sample
POST http://localhost:8080/mtr-backend/api/category/type


Update categorytype

URL
PUT <application-url>/api/category/type/<categoryTypeId>

Query parameter

Path parameter

Consumes

application/json
application/xml

com.matterial.mtr.api.object.CategoryType

Produces

application/json
application/xml

com.matterial.mtr.api.object.CategoryType (id only)

Permission
EDIT_CATEGORY

Sample
PUT http://localhost:8080/mtr-backend/api/category/type/4


Remove categorytype

You cannot remove CategoryTypes that have related Categories! This will return in StatusCode CATEGORY_TYPE_IN_USE = 200 and HTTP-Status BAD REQUEST.
URL
DELETE <application-url>/api/category/type/<categoryTypeId>

Path parameter

Produces

text/plain

Integer - count of removed

Permission
EDIT_CATEGORY

Sample
DELETE http://localhost:8080/mtr-backend/api/category/categorytype/4