🪙Payment types

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

Each purchase has to be paid using various methods, including cash, payment cards, vouchers, and more. These payment methods are collectively referred to as "payment types" and are represented by the PaymentType class.

API methods

Get payment types

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

Returns all payment types that matches query parameters. Result is of type QueryResult<PaymentType>.

Query Parameters

NameTypeDescription

number

int

Supports NData syntax.

isActive

bool

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.

category

PaymentTypeCategory

Supports NData syntax.

isChangeable

bool

Supports NData syntax.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

{
    "items":
    [
        {
            "number": 1,
            "category": "Cash",
            "isActive": true,
            "description": "Hotovosť",
            "isChangeable": true,
            "_v": 1
        },
        {
            "number": 2,
            "category": "CreditCard",
            "isActive": true,
            "description": "Platobná karta",
            "isChangeable": false,
            "_v": 2
        },
        {
            "number": 3,
            "category": "Other",
            "isActive": false,
            "description": "Šek",
            "isChangeable": false,
            "_v": 1
        },
        {
            "number": 4,
            "category": "Other",
            "isActive": false,
            "description": "Gastrolístky",
            "isChangeable": false,
            "_v": 1
        },
        {
            "number": 5,
            "category": "Other",
            "isActive": false,
            "description": "Iné",
            "isChangeable": false,
            "_v": 1
        },
        {
            "number": 6,
            "category": "Other",
            "isActive": true,
            "description": "Wolt",
            "isChangeable": false,
            "_v": 2
        },
        {
            "number": 7,
            "category": "Other",
            "isActive": true,
            "description": "Bolt",
            "isChangeable": false,
            "_v": 1
        },
        {
            "number": 8,
            "category": "Other",
            "isActive": true,
            "description": "Foodora",
            "isChangeable": false,
            "_v": 2
        },
        {
            "number": 9,
            "category": "Other",
            "isActive": true,
            "description": "Bistro.sk",
            "isChangeable": false,
            "_v": 2
        },
        {
            "number": 10,
            "category": "Other",
            "isActive": false,
            "description": "Adaptee",
            "isChangeable": false,
            "_v": 1
        }
    ],
    "count": 10,
    "totalCount": 10
}

Get payment type by number

GET http://{server-address}/paymenttypes/{number}

Result is of type PaymentType.

Path Parameters

NameTypeDescription

number*

int

Unique payment type number.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

{
    "number": 1,
    "category": "Cash",
    "isActive": true,
    "description": "Hotovosť",
    "isChangeable": true,
    "_v": 1
}

Create payment type

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

Creates new payment type. Result is of type PaymentType.

Required rights

Authorized user must have PaymentTypeCreate right assigned.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

Request Body

NameTypeDescription

(body)*

PaymentType

Model to create

{
    "number": 1,
    "category": "Cash",
    "isActive": true,
    "description": "Hotovosť",
    "isChangeable": true,
    "_v": 1
}

Create or update payment type

PUT http://{server-address}/paymenttypes/{number}

Updates existing or creates new payment type. Result is of type PaymentType.

Required rights

Authorized user must have assigned PaymentTypeCreate or PaymentTypeUpdate right.

Path Parameters

NameTypeDescription

number*

int

Unique payment type number.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

Request Body

NameTypeDescription

(body)*

PaymentType

The model to create or update.

{
    "number": 1,
    "category": "Cash",
    "isActive": true,
    "description": "Hotovosť",
    "isChangeable": true,
    "_v": 2
}

Delete payment type by number

DELETE http://{server-address}/paymenttypes/{number}

Required rights

Authorized user must have PaymentTypeDelete right assigned.

Path Parameters

NameTypeDescription

number*

int

Unique payment type number.

Headers

NameTypeDescription

Authorization*

string

Authorization header with authorization token.

{
    "number": 1,
    "category": "Cash",
    "isActive": true,
    "description": "Hotovosť",
    "isChangeable": true,
    "_v": 1
}

Last updated