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 zones
  • Get zone by name
  • Create zone
  • Create or update zone
  • Delete zone by name

Was this helpful?

  1. API reference

Zones

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

PreviousVatsNextIntroduction

Last updated 1 year ago

Was this helpful?

The zone represents visual representation of a specific area, such as a room, terrace, or any other defined space. It contains the layout, dimensions, and arrangement of objects within that area.

The data model for zone is represented by class.

API methods

Get zones

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

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

Query Parameters

Name
Type
Description

Name

string

Supports NData syntax.

DefaultFiscalName

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.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "items":
    [
        {
            "name": "Bar",
            "defaultFiscalName": null,
            "items":
            [
                {
                    "name": "B01",
                    "isTable": true,
                    "meta":
                    {
                        "position":
                        {
                            "x": 0.10,
                            "y": 0.10
                        },
                        "width": 0.12,
                        "height": 0.12,
                        "shape": "Rectangle",
                        "rotation": 0,
                        "color": "#cccccc"
                    }
                },
                {
                    "name": "B02",
                    "isTable": true,
                    "meta":
                    {
                        "position":
                        {
                            "x": 0.30,
                            "y": 0.10
                        },
                        "width": 0.12,
                        "height": 0.12,
                        "shape": "Rectangle",
                        "rotation": 0,
                        "color": "#cccccc"
                    }
                }
            ],
            "sortHint": 1,
            "_v": 1
        }
    ],
    "count": 1,
    "totalCount": 1
}

Get zone by name

GET http://{server-address}/zones/{name}

Path Parameters

Name
Type
Description

name*

string

Unique zone name.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "name": "Bar",
    "defaultFiscalName": null,
    "items":
    [
        {
            "name": "B01",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.10,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        },
        {
            "name": "B02",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.30,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        }
    ],
    "sortHint": 1,
    "_v": 1
}
{
    "title": "Zdroj nebol nΓ‘jdenΓ½",
    "status": 404
}

Create zone

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

Required rights

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

Zone

Zone model to create

{
    "name": "Bar",
    "defaultFiscalName": null,
    "items":
    [
        {
            "name": "B01",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.10,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        },
        {
            "name": "B02",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.30,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        }
    ],
    "sortHint": 1,
    "_v": 1
}

Create or update zone

PUT http://{server-address}/zones/{name}

Required rights

Path Parameters

Name
Type
Description

name*

string

Unique zone name.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

Zone

Zone model to create or update.

{
    "name": "Bar",
    "defaultFiscalName": null,
    "items":
    [
        {
            "name": "B01",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.10,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        },
        {
            "name": "B02",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.30,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        }
    ],
    "sortHint": 1,
    "_v": 1
}

Delete zone by name

DELETE http://{server-address}/zones/{name}

Required rights

Path Parameters

Name
Type
Description

name*

string

Unique zone name.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "name": "Bar",
    "defaultFiscalName": null,
    "items":
    [
        {
            "name": "B01",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.10,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        },
        {
            "name": "B02",
            "isTable": true,
            "meta":
            {
                "position":
                {
                    "x": 0.30,
                    "y": 0.10
                },
                "width": 0.12,
                "height": 0.12,
                "shape": "Rectangle",
                "rotation": 0,
                "color": "#cccccc"
            }
        }
    ],
    "sortHint": 1,
    "_v": 1
}
{
    "title": "Zdroj nebol nΓ‘jdenΓ½",
    "status": 404
}

Result is of type .

Creates new zone. Result is of type .

Authorized user must have ZoneCreate assigned.

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

Authorized user must have assigned ZoneCreate or ZoneUpdate .

Authorized user must have ZoneDelete assigned.

πŸͺ‘
right
right
right
Zone
QueryResult<Zone>
Zone
Zone
Zone