PORTOS Developers
  • πŸ‘‹Introduction
  • πŸ“–Glossary
  • HTTP Status codes
  • Error models
  • Error codes
  • Validation constraints
  • Resource names
  • πŸ”’User rights
  • Device environments
  • 🌍Localization
  • πŸ”NData query syntax
  • OpenAPI specification
  • Data models
  • Authentication
    • πŸ”Authentication schemes
      • JWT Bearer Authentication
      • HMAC Authentication
  • ⚑Notifications
    • SignalR
    • Webhooks
  • API reference
    • πŸ”‘API keys
    • πŸ›οΈArticle categories
    • πŸ’ΌCompanies
    • πŸ’±Currencies
    • πŸ‘«Customers
    • πŸ“ˆDaily sales reports
    • πŸ–₯️Devices
    • πŸ–¨οΈFiscals
    • ❀️Health check
    • πŸ“ƒLicense
    • 🎚️Modifiers
    • πŸ‘¨β€πŸ³Order endpoints
    • πŸ›ŽοΈOrders
    • πŸͺ™Payment types
    • β˜•Plus
    • πŸ”Roles
    • πŸ”Sessions
    • βš™οΈSettings
    • πŸ”ŽStock takings
    • πŸ”’Stock transfer numbering
    • 🚚Stock transfers
    • πŸ“¦Stocks
    • 🧾Tickets
      • Ticket Model States
      • Ticket Operations and User Rights
      • Ticket Model Mathematics
    • πŸ‘¨β€πŸ’ΌUsers
    • βš–οΈVats
    • πŸͺ‘Zones
  • 3rd Party Integrations
    • Introduction
    • Online orders API
    • Rewards API
    • PDA Files
  • Previous versions
    • Migration to V4.1
    • Migration to V4
    • Legacy documentation
Powered by GitBook
On this page
  • API methods
  • Get PLUs
  • Get PLU
  • Create PLU
  • Create or update PLU
  • Delete PLU

Was this helpful?

  1. API reference

Plus

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

PreviousPayment typesNextRoles

Last updated 5 months ago

Was this helpful?

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 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.

  4. Container: A container (cover) that can be the subject of a deposit and can be repurchased by a trader. This is an material product that has physical representation and associated stock quantity and can be processed in stock takings. Container PLU must be associated with VAT that represents non-taxable items.

Stock items, recipes, services and containers 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 .

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

Name
Type
Description

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

Headers

Name
Type
Description

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"
                }
            ],
            "retailPriceIncludingVat":
            {
                "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,
            "retailPriceIncludingVat":
            {
                "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,
            "retailPriceIncludingVat":
            {
                "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
}
{
    "items":
    [
        {
            "receipt":
            [
                {
                    "plu":
                    {
                        "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,
                        "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": 1
                    },
                    "pluId":
                    {
                        "code": 1,
                        "stockName": "S11"
                    },
                    "quantity":
                    {
                        "amount": 3.0,
                        "unit": "ks"
                    }
                },
                {
                    "plu":
                    {
                        "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,
                        "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
                    },
                    "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,
            "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,
            "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": 1
        },
        {
            "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,
            "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
}// Some code

Get PLU

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

Path Parameters

Name
Type
Description

id*

string

Unique PLU identifier.

Headers

Name
Type
Description

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,
    "retailPriceIncludingVat":
    {
        "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
}
{
    "title": "Zdroj nebol nΓ‘jdenΓ½",
    "status": 404
}

Create PLU

POST http://{server-address}plus

Required rights

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(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,
    "retailPriceIncludingVat":
    {
        "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}

Required rights

Path Parameters

Name
Type
Description

id*

string

Unique PLU identifier.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(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,
    "retailPriceIncludingVat":
    {
        "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

Path Parameters

Name
Type
Description

id*

string

Unique PLU identifier.

Headers

Name
Type
Description

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,        
    "retailPriceIncludingVat":
    {
        "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
}
{
    "title": "Zdroj nebol nΓ‘jdenΓ½",
    "status": 404
}

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

Result is of type .

Creates new PLU. Result is of type .

Authorized user must have PluCreate assigned.

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

Authorized user must have assigned PluCreate or PluUpdate .

Authorized user must have PluDelete assigned.

β˜•
right
right
right
PLU
types
QueryResult<Plu>
Plu
Plu
Plu
PluReceiptItem
Plu