πŸ’±Currencies

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

Collection of currencies contains exactly one currency marked as domestic. All system transactions are conducted exclusively in the domestic currency.

Currency is represented by Currency class.

API methods

Get currencies

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

Returns all currencies that matches query parameters. Result is of type QueryResult<Currency>.

Query Parameters

Headers

{
    "items":
    [
        {
            "IsDomestic": true,
            "Label": "EUR",
            "Sign": "€",
            "ExchangeRate": 1,
            "Description": "Euro",
            "_v": 1
        },
        {
            "IsDomestic": false,
            "Label": "USD",
            "Sign": "$",
            "ExchangeRate": 1.1214,
            "Description": "US Dollar",
            "_v": 1
        },
        {
            "IsDomestic": false,
            "Label": "CZK",
            "Sign": null,
            "ExchangeRate": 23.7529,
            "Description": "Czech Crown",
            "_v": 1
        }
    ],
    "count": 3,
    "totalCount": 3
}

Get currency by label

GET http://{server-address}/currencies/{label}

Result is of type Currency.

Path Parameters

Headers

{
    "IsDomestic": true,
    "Label": "EUR",
    "Sign": "€",
    "ExchangeRate": 1,
    "Description": "Euro",
    "_v": 1
}

Create currency

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

Creates new currency. Result is of type Currency.

Required rights

Authorized user must have CurrencyCreate right assigned.

Headers

Request Body

{
    "IsDomestic": true,
    "Label": "EUR",
    "Sign": "€",
    "ExchangeRate": 1,
    "Description": "Euro",
    "_v": 1
}

Create or update currency

PUT http://{server-address}/currencies/{label}

Creates new or updates existing currency. Result is of type Currency.

Required rights

Authorized user must have assigned CurrencyCreate or CurrencyUpdate right.

Path Parameters

Headers

Request Body

{
    "IsDomestic": true,
    "Label": "EUR",
    "Sign": "€",
    "ExchangeRate": 1,
    "Description": "Euro",
    "_v": 2
}

Delete currency by label

DELETE http://{server-address}/currencies/{label}

Required rights

Authorized user must have CurrencyDelete right assigned.

Path Parameters

Headers

{
    "IsDomestic": true,
    "Label": "EUR",
    "Sign": "€",
    "ExchangeRate": 1,
    "Description": "Euro",
    "_v": 1
}

Last updated