πŸ›οΈArticle categories

This page provides a description of the available API routes for managing article category.

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

Headers

{
    "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

Headers

{
    "_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 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.

Headers

Request Body

{
    "_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

Headers

Request Body

{
    "_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

Headers

{
    "_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"
                    }
                }
            ]
        }
    ]
}

Last updated