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 orders
  • Get order
  • Process order
  • Set order status
  • Set order item status
  • Set order endpoint status
  • Delete order

Was this helpful?

  1. API reference

Orders

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

PreviousOrder endpointsNextPayment types

Last updated 1 year ago

Was this helpful?

After each ticket update, orders are automatically generated. Each order includes contextual information about the products and specifies the order endpoint where the products will be processed.

Order is represented by class.

API methods

Get orders

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

Returns all orders that matches query parameters. Result is of type .

Query Parameters

Name
Type
Description

deviceName

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.

id

string

Supports NData syntax.

number

int

Supports NData syntax.

ticketId

string

Supports NData syntax.

ticketName

string

Supports NData syntax.

userUserName

string

Supports NData syntax.

isProcessed

bool

Supports NData syntax.

isProcessable

bool

Supports NData syntax.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "items":
    [
        {
            "id": "64b70e39fa08b1c38bfc5c56",
            "number": 2,
            "deviceName": "PDA1",
            "user":
            {
                "name": "Cashier",
                "userName": "999",
                "featureName": null
            },
            "ticket":
            {
                "id": "64b70d71fa08b1c38bfc5c55",
                "name": "G-01-01",
                "location":
                {
                    "zoneName": "Garden",
                    "tableName": "G-01"
                },
                "purchaseType": "WalkIn",
                "customer": null,
                "version": 2
            },
            "items":
            [
                {
                    "id": 1,
                    "plu":
                    {
                        "name": "Pilsner",
                        "code": 405,
                        "stockName": "S01"
                    },
                    "quantity":
                    {
                        "amount": 2.0,
                        "unit": "ks"
                    },
                    "comment": null,
                    "endpoints":
                    [
                        {
                            "name": "Bar",
                            "statusChanges":
                            [
                                {
                                    "status": "Created",
                                    "date": "2023-07-18T13:12:09.344Z"
                                },
                                {
                                    "status": "Processed",
                                    "date": "2023-07-18T13:12:09.706Z"
                                }
                            ],
                            "orderItemStatus": "Processed",
                            "isProcessed": true,
                            "isProcessable": false
                        }
                    ],
                    "courseNumber": null,
                    "isProcessable": false,
                    "isProcessed": true
                },
                {
                    "id": 2,
                    "plu":
                    {
                        "name": "Chicken wings",
                        "code": 172,
                        "stockName": "S01"
                    },
                    "quantity":
                    {
                        "amount": 1.0,
                        "unit": "ks"
                    },
                    "comment": "Extra spicy, please!",
                    "endpoints":
                    [
                        {
                            "name": "Kitchen",
                            "statusChanges":
                            [
                                {
                                    "status": "Created",
                                    "date": "2023-07-18T13:12:09.346Z"
                                },
                                {
                                    "status": "Processed",
                                    "date": "2023-07-18T13:12:09.706Z"
                                }
                            ],
                            "orderItemStatus": "Processed",
                            "isProcessed": true,
                            "isProcessable": false
                        }
                    ],
                    "courseNumber": null,
                    "isProcessable": false,
                    "isProcessed": true
                }
            ],
            "isProcessed": true,
            "isProcessable": false
        }
    ],
    "count": 1,
    "totalCount": 1
}

Get order

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

Path Parameters

Name
Type
Description

id*

string

Unique order identifier.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "id": "64b70e39fa08b1c38bfc5c56",
    "number": 2,
    "deviceName": "PDA1",
    "user":
    {
        "name": "Cashier",
        "userName": "999",
        "featureName": null
    },
    "ticket":
    {
        "id": "64b70d71fa08b1c38bfc5c55",
        "name": "G-01-01",
        "location":
        {
            "zoneName": "Garden",
            "tableName": "G-01"
        },
        "purchaseType": "WalkIn",
        "customer": null,
        "version": 2
    },
    "items":
    [
        {
            "id": 1,
            "plu":
            {
                "name": "Pilsner",
                "code": 405,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 2.0,
                "unit": "ks"
            },
            "comment": null,
            "endpoints":
            [
                {
                    "name": "Bar",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.344Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        },
        {
            "id": 2,
            "plu":
            {
                "name": "Chicken wings",
                "code": 172,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 1.0,
                "unit": "ks"
            },
            "comment": "Extra spicy, please!",
            "endpoints":
            [
                {
                    "name": "Kitchen",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.346Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        }
    ],
    "isProcessed": true,
    "isProcessable": false
}
{
    "title": "Zdroj nebol nájdený",
    "status": 404
}

Process order

POST http://{server-address}/orders

Required rights

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

ProcessOrdersContext

Conext to specify order processing.

[
    {
        "id": "64b70e39fa08b1c38bfc5c56",
        "number": 2,
        "deviceName": "PDA1",
        "user":
        {
            "name": "Cashier",
            "userName": "999",
            "featureName": null
        },
        "ticket":
        {
            "id": "64b70d71fa08b1c38bfc5c55",
            "name": "G-01-01",
            "location":
            {
                "zoneName": "Garden",
                "tableName": "G-01"
            },
            "purchaseType": "WalkIn",
            "customer": null,
            "version": 2
        },
        "items":
        [
            {
                "id": 1,
                "plu":
                {
                    "name": "Pilsner",
                    "code": 405,
                    "stockName": "S01"
                },
                "quantity":
                {
                    "amount": 2.0,
                    "unit": "ks"
                },
                "comment": null,
                "endpoints":
                [
                    {
                        "name": "Bar",
                        "statusChanges":
                        [
                            {
                                "status": "Created",
                                "date": "2023-07-18T13:12:09.344Z"
                            },
                            {
                                "status": "Processed",
                                "date": "2023-07-18T13:12:09.706Z"
                            }
                        ],
                        "orderItemStatus": "Processed",
                        "isProcessed": true,
                        "isProcessable": false
                    }
                ],
                "courseNumber": null,
                "isProcessable": false,
                "isProcessed": true
            },
            {
                "id": 2,
                "plu":
                {
                    "name": "Chicken wings",
                    "code": 172,
                    "stockName": "S01"
                },
                "quantity":
                {
                    "amount": 1.0,
                    "unit": "ks"
                },
                "comment": "Extra spicy, please!",
                "endpoints":
                [
                    {
                        "name": "Kitchen",
                        "statusChanges":
                        [
                            {
                                "status": "Created",
                                "date": "2023-07-18T13:12:09.346Z"
                            },
                            {
                                "status": "Processed",
                                "date": "2023-07-18T13:12:09.706Z"
                            }
                        ],
                        "orderItemStatus": "Processed",
                        "isProcessed": true,
                        "isProcessable": false
                    }
                ],
                "courseNumber": null,
                "isProcessable": false,
                "isProcessed": true
            }
        ],
        "isProcessed": true,
        "isProcessable": false
    }
]

Set order status

POST http://{server-address}/orders/{id}/status

Required rights

Path Parameters

Name
Type
Description

id*

string

Order unique identifier

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

OrderStatusContext

{
    "id": "64b70e39fa08b1c38bfc5c56",
    "number": 2,
    "deviceName": "PDA1",
    "user":
    {
        "name": "Cashier",
        "userName": "999",
        "featureName": null
    },
    "ticket":
    {
        "id": "64b70d71fa08b1c38bfc5c55",
        "name": "G-01-01",
        "location":
        {
            "zoneName": "Garden",
            "tableName": "G-01"
        },
        "purchaseType": "WalkIn",
        "customer": null,
        "version": 2
    },
    "items":
    [
        {
            "id": 1,
            "plu":
            {
                "name": "Pilsner",
                "code": 405,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 2.0,
                "unit": "ks"
            },
            "comment": null,
            "endpoints":
            [
                {
                    "name": "Bar",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.344Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        },
        {
            "id": 2,
            "plu":
            {
                "name": "Chicken wings",
                "code": 172,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 1.0,
                "unit": "ks"
            },
            "comment": "Extra spicy, please!",
            "endpoints":
            [
                {
                    "name": "Kitchen",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.346Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        }
    ],
    "isProcessed": true,
    "isProcessable": false
}

Set order item status

POST http://{server-address}/orders/{id}/items/{itemId}/status

Required rights

Path Parameters

Name
Type
Description

id*

string

Order unique identifier

itemId*

int

Order item identifier

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)

OrderStatusContext

{
    "id": "64b70e39fa08b1c38bfc5c56",
    "number": 2,
    "deviceName": "PDA1",
    "user":
    {
        "name": "Cashier",
        "userName": "999",
        "featureName": null
    },
    "ticket":
    {
        "id": "64b70d71fa08b1c38bfc5c55",
        "name": "G-01-01",
        "location":
        {
            "zoneName": "Garden",
            "tableName": "G-01"
        },
        "purchaseType": "WalkIn",
        "customer": null,
        "version": 2
    },
    "items":
    [
        {
            "id": 1,
            "plu":
            {
                "name": "Pilsner",
                "code": 405,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 2.0,
                "unit": "ks"
            },
            "comment": null,
            "endpoints":
            [
                {
                    "name": "Bar",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.344Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        },
        {
            "id": 2,
            "plu":
            {
                "name": "Chicken wings",
                "code": 172,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 1.0,
                "unit": "ks"
            },
            "comment": "Extra spicy, please!",
            "endpoints":
            [
                {
                    "name": "Kitchen",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.346Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        }
    ],
    "isProcessed": true,
    "isProcessable": false
}

Set order endpoint status

POST http://{server-address}/orders/{id}/endpoints/{endpointName}/status

Required rights

Path Parameters

Name
Type
Description

id*

string

Order unique identifier

endpointName*

string

Order endpoint name

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)

OrderStatusContext

{
    "id": "64b70e39fa08b1c38bfc5c56",
    "number": 2,
    "deviceName": "PDA1",
    "user":
    {
        "name": "Cashier",
        "userName": "999",
        "featureName": null
    },
    "ticket":
    {
        "id": "64b70d71fa08b1c38bfc5c55",
        "name": "G-01-01",
        "location":
        {
            "zoneName": "Garden",
            "tableName": "G-01"
        },
        "purchaseType": "WalkIn",
        "customer": null,
        "version": 2
    },
    "items":
    [
        {
            "id": 1,
            "plu":
            {
                "name": "Pilsner",
                "code": 405,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 2.0,
                "unit": "ks"
            },
            "comment": null,
            "endpoints":
            [
                {
                    "name": "Bar",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.344Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        },
        {
            "id": 2,
            "plu":
            {
                "name": "Chicken wings",
                "code": 172,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 1.0,
                "unit": "ks"
            },
            "comment": "Extra spicy, please!",
            "endpoints":
            [
                {
                    "name": "Kitchen",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.346Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        }
    ],
    "isProcessed": true,
    "isProcessable": false
}

Delete order

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

Required rights

Path Parameters

Name
Type
Description

id*

string

Unique order identifier.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "id": "64b70e39fa08b1c38bfc5c56",
    "number": 2,
    "deviceName": "PDA1",
    "user":
    {
        "name": "Cashier",
        "userName": "999",
        "featureName": null
    },
    "ticket":
    {
        "id": "64b70d71fa08b1c38bfc5c55",
        "name": "G-01-01",
        "location":
        {
            "zoneName": "Garden",
            "tableName": "G-01"
        },
        "purchaseType": "WalkIn",
        "customer": null,
        "version": 2
    },
    "items":
    [
        {
            "id": 1,
            "plu":
            {
                "name": "Pilsner",
                "code": 405,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 2.0,
                "unit": "ks"
            },
            "comment": null,
            "endpoints":
            [
                {
                    "name": "Bar",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.344Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        },
        {
            "id": 2,
            "plu":
            {
                "name": "Chicken wings",
                "code": 172,
                "stockName": "S01"
            },
            "quantity":
            {
                "amount": 1.0,
                "unit": "ks"
            },
            "comment": "Extra spicy, please!",
            "endpoints":
            [
                {
                    "name": "Kitchen",
                    "statusChanges":
                    [
                        {
                            "status": "Created",
                            "date": "2023-07-18T13:12:09.346Z"
                        },
                        {
                            "status": "Processed",
                            "date": "2023-07-18T13:12:09.706Z"
                        }
                    ],
                    "orderItemStatus": "Processed",
                    "isProcessed": true,
                    "isProcessable": false
                }
            ],
            "courseNumber": null,
            "isProcessable": false,
            "isProcessed": true
        }
    ],
    "isProcessed": true,
    "isProcessable": false
}
{
    "title": "Zdroj nebol nájdený",
    "status": 404
}

Result is of type .

Invokes order processing. Method accepts in request body, that is used to specify orders to be processed, using identifiers. Collection of all affected models is returned.

Authorized user must have OrderProcess assigned.

Manually changes status for entire order (for all items and all associated order endpoints). Method accepts in request body. Updated is returned.

Authorized user must have OrderUpdate assigned.

Manually changes order status for specified . Status is set for all associated with given order item. Method accepts in request body. Updated is returned.

Authorized user must have OrderUpdate assigned.

Manually change the order status for a specified on a specific . Method accepts in request body. Updated is returned.

Authorized user must have OrderUpdate assigned.

Authorized user must have OrderDelete assigned.

🛎️
right
right
right
right
right
Order
QueryResult<Order>
Order
ProcessOrdersContext
Ticket
Order
OrderStatusContext
Order
order item
order endpoints
OrderStatusContext
Order
order item
order endpoint
OrderStatusContext
Order