โ˜•Plus

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

PLU is common abbreviation for goods or services, sold via cash register system. Each PLU can be uniquely identified by its id or a combination of the stockName and code properties.

There are several PLU types defined in PORTOS system:

  1. Stock item: This refers to a product that can be physically held in stock. Information regarding stock quantity can be linked to PLUs of the stock item type, using stockQuantity property. When customers purchase items of this type, the corresponding stock quantities are updated accordingly.

  2. Recipe: A recipe PLU represents a product that is a combination of other stock items and/or recipes. When a single unit of a recipe is sold, one or more products of the stock item type are deducted from the stock, based on receipt collection. However, no information related to stock quantity is associated with this particular type of PLU.

  3. Service: This type of PLU represents a product that lacks a physical form. Services, unlike tangible goods, are intangible offerings. They are provided to customers without any physical representation or inventory involvement.

Stock items, recipes, and services can be accessed through the PLU API routes listed below.

API methods

Get PLUs

GET http://{server-address}/plus

Returns all roles that matches query parameters. Result is of type QueryResult<Plu>.

To retrieve PLUs referenced by receipt as well, specify Receipt.Plu value in $include query parameter (e.g. GET {server_address}/plus?$include=Receipt.Plu).

Query Parameters

Headers

{
    "items":
    [
        {
            "receipt":
            [
                {
                    "pluId":
                    {
                        "code": 1,
                        "stockName": "S11"
                    },
                    "quantity":
                    {
                        "amount": 3.0,
                        "unit": "ks"
                    }
                },
                {
                    "pluId":
                    {
                        "code": 2,
                        "stockName": "S11"
                    },
                    "quantity":
                    {
                        "amount": 0.2,
                        "unit": "kg"
                    }
                }
            ],
            "articleCategoryLabel": "RAN",
            "courseNumber": null,
            "codes":
            [],
            "code": 411,
            "color": null,
            "description": null,
            "customerDescription": null,
            "id": "64d9e9fac869b340658c98cc",
            "isActive": true,
            "isDiscountAllowed": true,
            "isPriceFixed": false,
            "isSplittable": false,
            "minStockQuantity": null,
            "name": "Ham & Eggs",
            "orderEndpointNames":
            [],
            "priceHistory":
            [],
            "images": null,
            "ordering": null,
            "purchaseTypes": null,
            "modifiers": [
                {
                    "id": "657b20bbde0bfde5af0f59dd"
                }
            ],
            "retailPrice":
            {
                "amount": 7.9,
                "currencyLabel": "EUR"
            },
            "stockName": "S01",
            "stockQuantity": null,
            "stockValue": null,
            "lastPurchasePrice": null,
            "type": "Recipe",
            "unit": "ks",
            "vatCategory": 1,
            "packaging": null,
            "specialRegulation": null,
            "isCashbackAllowed": false,
            "isFavorite": false,
            "sortHint": null,
            "_v": 1
        },
        {
            "receipt": null,
            "articleCategoryLabel": "OTH",
            "courseNumber": null,
            "codes":
            [],
            "code": 1,
            "color": null,
            "description": null,
            "customerDescription": null,
            "id": "64d9e99cc869b340658c98ca",
            "isActive": true,
            "isDiscountAllowed": true,
            "isPriceFixed": false,
            "isSplittable": false,
            "minStockQuantity": null,
            "name": "Eggs",
            "orderEndpointNames":
            [],
            "priceHistory":
            [],
            "images": null,
            "ordering": null,
            "purchaseTypes": null,
            "modifiers": null,
            "retailPrice":
            {
                "amount": 0.5,
                "currencyLabel": "EUR"
            },
            "stockName": "S11",
            "stockQuantity":
            {
                "amount": 10.0,
                "unit": "ks"
            },
            "stockValue":
            {
                "amount": 20.0,
                "currencyLabel": "EUR"
            },
            "lastPurchasePrice":
            {
                "amount": 2.0,
                "currencyLabel": "EUR"
            },
            "type": "StockItem",
            "unit": "ks",
            "vatCategory": 1,
            "packaging": null,
            "specialRegulation": null,
            "isCashbackAllowed": false,
            "isFavorite": false,
            "sortHint": null,
            "_v": 2
        },
        {
            "receipt": null,
            "articleCategoryLabel": "OTH",
            "courseNumber": null,
            "codes":
            [],
            "code": 2,
            "color": null,
            "description": null,
            "customerDescription": null,
            "id": "64d9e9c6c869b340658c98cb",
            "isActive": true,
            "isDiscountAllowed": true,
            "isPriceFixed": false,
            "isSplittable": false,
            "minStockQuantity": null,
            "name": "Ham",
            "orderEndpointNames":
            [],
            "priceHistory":
            [],
            "images": null,
            "ordering": null,
            "purchaseTypes": null,
            "modifiers": null,
            "retailPrice":
            {
                "amount": 32.0,
                "currencyLabel": "EUR"
            },
            "stockName": "S11",
            "stockQuantity":
            {
                "amount": 0.0,
                "unit": "kg"
            },
            "stockValue":
            {
                "amount": 0.0,
                "currencyLabel": "EUR"
            },
            "lastPurchasePrice": null,
            "type": "StockItem",
            "unit": "kg",
            "vatCategory": 1,
            "packaging": null,
            "specialRegulation": null,
            "isCashbackAllowed": false,
            "isFavorite": false,
            "sortHint": null,
            "_v": 1
        }
    ],
    "count": 3,
    "totalCount": 3
}

Get PLU

GET http://{server-address}/plus/{id}

Result is of type Plu.

Path Parameters

Headers

{
    "receipt":
    [
        {
            "pluId":
            {
                "code": 1,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 3.0,
                "unit": "ks"
            }
        },
        {
            "pluId":
            {
                "code": 2,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 0.2,
                "unit": "kg"
            }
        }
    ],
    "articleCategoryLabel": "RAN",
    "courseNumber": null,
    "codes":
    [],
    "code": 411,
    "color": null,
    "description": null,
    "customerDescription": null,
    "id": "64d9e9fac869b340658c98cc",
    "isActive": true,
    "isDiscountAllowed": true,
    "isPriceFixed": false,
    "isSplittable": false,
    "minStockQuantity": null,
    "name": "Ham & Eggs",
    "orderEndpointNames":
    [],
    "priceHistory":
    [],
    "images": null,
    "ordering": null,
    "purchaseTypes": null,
    "modifiers": null,
    "retailPrice":
    {
        "amount": 7.9,
        "currencyLabel": "EUR"
    },
    "stockName": "S01",
    "stockQuantity": null,
    "stockValue": null,
    "lastPurchasePrice": null,
    "type": "Recipe",
    "unit": "ks",
    "vatCategory": 1,
    "packaging": null,
    "specialRegulation": null,
    "isCashbackAllowed": false,
    "isFavorite": false,
    "sortHint": null,
    "_v": 1
}

Create PLU

POST http://{server-address}plus

Creates new PLU. Result is of type Plu.

Required rights

Authorized user must have PluCreate right assigned.

Headers

Request Body

{
    "receipt":
    [
        {
            "pluId":
            {
                "code": 1,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 3.0,
                "unit": "ks"
            }
        },
        {
            "pluId":
            {
                "code": 2,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 0.2,
                "unit": "kg"
            }
        }
    ],
    "articleCategoryLabel": "RAN",
    "courseNumber": null,
    "codes":
    [],
    "code": 411,
    "color": null,
    "description": null,
    "customerDescription": null,
    "id": "64d9e9fac869b340658c98cc",
    "isActive": true,
    "isDiscountAllowed": true,
    "isPriceFixed": false,
    "isSplittable": false,
    "minStockQuantity": null,
    "name": "Ham & Eggs",
    "orderEndpointNames":
    [],
    "priceHistory":
    [],
    "images": null,
    "ordering": null,
    "purchaseTypes": null,
    "modifiers": null,
    "retailPrice":
    {
        "amount": 7.9,
        "currencyLabel": "EUR"
    },
    "stockName": "S01",
    "stockQuantity": null,
    "stockValue": null,
    "lastPurchasePrice": null,
    "type": "Recipe",
    "unit": "ks",
    "vatCategory": 1,
    "packaging": null,
    "specialRegulation": null,
    "isCashbackAllowed": false,
    "isFavorite": false,
    "sortHint": null,
    "_v": 1
}

Create or update PLU

PUT http://{server-address}/plus/{id}

Updates existing or creates new PLU. Result is of type Plu.

Required rights

Authorized user must have assigned PluCreate or PluUpdate right.

Path Parameters

Headers

Request Body

{
    "receipt":
    [
        {
            "pluId":
            {
                "code": 1,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 3.0,
                "unit": "ks"
            }
        },
        {
            "pluId":
            {
                "code": 2,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 0.2,
                "unit": "kg"
            }
        }
    ],
    "articleCategoryLabel": "RAN",
    "courseNumber": null,
    "codes":
    [],
    "code": 411,
    "color": null,
    "description": null,
    "customerDescription": null,
    "id": "64d9e9fac869b340658c98cc",
    "isActive": true,
    "isDiscountAllowed": true,
    "isPriceFixed": false,
    "isSplittable": false,
    "minStockQuantity": null,
    "name": "Ham & Eggs",
    "orderEndpointNames":
    [],
    "priceHistory":
    [],
    "images": null,
    "ordering": null,
    "purchaseTypes": null,
    "modifiers": null,
    "retailPrice":
    {
        "amount": 7.9,
        "currencyLabel": "EUR"
    },
    "stockName": "S01",
    "stockQuantity": null,
    "stockValue": null,
    "lastPurchasePrice": null,
    "type": "Recipe",
    "unit": "ks",
    "vatCategory": 1,
    "packaging": null,
    "specialRegulation": null,
    "isCashbackAllowed": false,
    "isFavorite": false,
    "sortHint": null,
    "_v": 1
}

Delete PLU

DELETE http://{server-address}/plus/{id}

Required rights

Authorized user must have PluDelete right assigned.

Path Parameters

Headers

{
    "receipt":
    [
        {
            "pluId":
            {
                "code": 1,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 3.0,
                "unit": "ks"
            }
        },
        {
            "pluId":
            {
                "code": 2,
                "stockName": "S11"
            },
            "quantity":
            {
                "amount": 0.2,
                "unit": "kg"
            }
        }
    ],
    "articleCategoryLabel": "RAN",
    "courseNumber": null,
    "codes":
    [],
    "code": 411,
    "color": null,
    "description": null,
    "customerDescription": null,
    "id": "64d9e9fac869b340658c98cc",
    "isActive": true,
    "isDiscountAllowed": true,
    "isPriceFixed": false,
    "isSplittable": false,
    "minStockQuantity": null,
    "name": "Ham & Eggs",
    "orderEndpointNames":
    [],
    "priceHistory":
    [],
    "images": null,
    "ordering": null,
    "purchaseTypes": null,
    "modifiers": null,        
    "retailPrice":
    {
        "amount": 7.9,
        "currencyLabel": "EUR"
    },
    "stockName": "S01",
    "stockQuantity": null,
    "stockValue": null,
    "lastPurchasePrice": null,
    "type": "Recipe",
    "unit": "ks",
    "vatCategory": 1,
    "packaging": null,
    "specialRegulation": null,
    "isCashbackAllowed": false,
    "isFavorite": false,
    "sortHint": null,
    "_v": 1
}

Last updated