โ˜•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

NameTypeDescription

id

string

Supports NData syntax.

articleCategoryLabel

string

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.

code

int

Supports NData syntax.

color

string

Supports NData syntax.

isActive

bool

Supports NData syntax.

isDiscountAllowed

bool

Supports NData syntax.

isPriceFixed

bool

Supports NData syntax.

courseNumber

int

Supports NData syntax.

unit

string

Supports NData syntax.

type

PluType

Supports NData syntax.

stockName

string

Supports NData syntax.

name

string

Supports NData syntax.

isSplittable

bool

Supports NData syntax.

stockQuantityAmount

decimal

Supports NData syntax.

search

string

Provided parameter will perform partial, case insensitive search across name, code and codes properties.

vatCategory

int

Supports NData syntax.

isStockQuantitySufficient

bool

If set true, only PLUs with stockQuantity equal or above respective minStockQuantity will be returned. If set to false, only PLUs with stockQuantity less than minStockQuantity will be returned.

receiptItemPluCode

int

Only PLUs that contains PLU with specified code in receipt collection will match the query. Supports NData syntax.

receiptItemPluStockName

string

Only PLUs that contains PLU with specified stock name in receipt collection will match the query. Supports NData syntax.

$include

string

If Receipt.Plu is specified as value of query parameter, all PluReceiptItems will contain referenced Plu in plu property. See example responses.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

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

NameTypeDescription

id*

string

Unique PLU identifier.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

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

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

Request Body

NameTypeDescription

(body)*

Plu

PLU model to create

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

NameTypeDescription

id*

string

Unique PLU identifier.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

Request Body

NameTypeDescription

(body)*

Plu

Model to create or update.

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

NameTypeDescription

id*

string

Unique PLU identifier.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

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