πŸ›οΈ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

Name
Type
Description

color

string

Supports NData syntax.

courseNumber

int

Supports NData syntax.

$skip

int

Pagination property. Describing number of records to skip from beginning of result collection.

$take

int

Pagination property. Maximum count of items to be returned.

$sort

string[]

Comma separated list of property names. Please see NData syntax.

$count

bool

If set to true, response will not contain items collection. Use to get resource count, not the resources themselves.

label

string

Supports NData syn

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

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

Name
Type
Description

label*

string

Unique article category label.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

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

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

ArticleCategory

Model to create.

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

Name
Type
Description

label*

string

Unique article category label.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

ArticleCategory

Model to create or update.

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

Name
Type
Description

label*

string

Unique article category label.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

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