Each product or service within the PORTOS system is linked to a specific category (e.g. desserts, soups, meals, ...), which is referred to as the article category . This categorization helps in organizing and classifying items, allowing for efficient management and navigation within the system.
Article category is represented by ArticleCategory
class.
API methods
Get article categories
GET
http://{server-address}/articlecategories
Returns all article categories that matches query parameters. Result is of type QueryResult<ArticleCategory>
.
Query Parameters
200: OK Successful response
Copy {
"items" :
[
{
"_v" : 1 ,
"description" : "Daily menu" ,
"label" : "MNU" ,
"color" : "#AED581" ,
"courseNumber" : null ,
"customerDescription" : "Meals according to the daily menu" ,
"sortHint" : 1 ,
"tags" :
[
"Kitchen"
] ,
"ordering" :
[
{
"orderOrigin" : "Online" ,
"enabled" : true ,
"weeklySchedule" :
[
{
"days" :
[
"Monday" ,
"Tuesday" ,
"Wednesday" ,
"Thursday" ,
"Friday"
] ,
"timeRange" :
{
"from" : "11:00:00" ,
"to" : "13:30:00"
}
}
]
}
]
} ,
{
"label" : "BRS" ,
"description" : "Beers" ,
"customerDescription" : null ,
"courseNumber" : null ,
"color" : "#FF8F00" ,
"sortHint" : 1 ,
"tags" :
[] ,
"_v" : 1
} ,
{
"label" : "SOF" ,
"description" : "Soft Drinks" ,
"customerDescription" : null ,
"courseNumber" : null ,
"color" : null ,
"sortHint" : null ,
"tags" :
[] ,
"_v" : 1
}
] ,
"count" : 3 ,
"totalCount" : 3
}
Get article category by label
GET
http://{server-address}/articlecategories/{label}
Result is of type Article category .
Path Parameters
200: OK Resource found. 404: Not Found Article category with given label is not found.
Copy {
"_v" : 1 ,
"description" : "Daily menu" ,
"label" : "MNU" ,
"color" : "#AED581" ,
"courseNumber" : null ,
"customerDescription" : "Meals according to the daily menu" ,
"sortHint" : 1 ,
"tags" :
[
"Kitchen"
] ,
"ordering" :
[
{
"orderOrigin" : "Online" ,
"enabled" : true ,
"weeklySchedule" :
[
{
"days" :
[
"Monday" ,
"Tuesday" ,
"Wednesday" ,
"Thursday" ,
"Friday"
] ,
"timeRange" :
{
"from" : "11:00:00" ,
"to" : "13:30:00"
}
}
]
}
]
}
Copy {
"title" : "Zdroj nebol nΓ‘jdenΓ½" ,
"status" : 404
}
Create article category
POST
http://{server-address}/articlecategories
Creates new article category. Result is of type Article category .
Required rights
Authorized user must have ArticleCategoryCreate
right assigned.
Request Body
201: Created Successfuly created.
Copy {
"_v" : 1 ,
"description" : "Daily menu" ,
"label" : "MNU" ,
"color" : "#AED581" ,
"courseNumber" : null ,
"customerDescription" : "Meals according to the daily menu" ,
"sortHint" : 1 ,
"tags" :
[
"Kitchen"
] ,
"ordering" :
[
{
"orderOrigin" : "Online" ,
"enabled" : true ,
"weeklySchedule" :
[
{
"days" :
[
"Monday" ,
"Tuesday" ,
"Wednesday" ,
"Thursday" ,
"Friday"
] ,
"timeRange" :
{
"from" : "11:00:00" ,
"to" : "13:30:00"
}
}
]
}
]
}
Create or update article category
PUT
http://{server-address}/articlecategories/{label}
Creates new or updates existing article category. Result is of type Article category .
Required rights
Authorized user must have assigned ArticleCategoryCreate
or ArticleCategoryUpdate
right .
Path Parameters
Request Body
200: OK Successfuly created or updated.
Copy {
"_v" : 1 ,
"description" : "Daily menu" ,
"label" : "MNU" ,
"color" : "#AED581" ,
"courseNumber" : null ,
"customerDescription" : "Meals according to the daily menu" ,
"sortHint" : 1 ,
"tags" :
[
"Kitchen"
] ,
"ordering" :
[
{
"orderOrigin" : "Online" ,
"enabled" : true ,
"weeklySchedule" :
[
{
"days" :
[
"Monday" ,
"Tuesday" ,
"Wednesday" ,
"Thursday" ,
"Friday"
] ,
"timeRange" :
{
"from" : "11:00:00" ,
"to" : "13:30:00"
}
}
]
}
]
}
Delete article category by label
DELETE
http://{server-address}/articlecategories/{label}
Required rights
Authorized user must have ArticleCategoryDelete
right assigned.
Path Parameters
200: OK Successfuly deleted. 404: Not Found Given resource was not found.
Copy {
"_v" : 1 ,
"description" : "Daily menu" ,
"label" : "MNU" ,
"color" : "#AED581" ,
"courseNumber" : null ,
"customerDescription" : "Meals according to the daily menu" ,
"sortHint" : 1 ,
"tags" :
[
"Kitchen"
] ,
"ordering" :
[
{
"orderOrigin" : "Online" ,
"enabled" : true ,
"weeklySchedule" :
[
{
"days" :
[
"Monday" ,
"Tuesday" ,
"Wednesday" ,
"Thursday" ,
"Friday"
] ,
"timeRange" :
{
"from" : "11:00:00" ,
"to" : "13:30:00"
}
}
]
}
]
}
Copy {
"title" : "Zdroj nebol nΓ‘jdenΓ½" ,
"status" : 404
}