π±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
label
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.
isDomestic
bool
Supports NData syntax.
Headers
Authorization*
string
Authorization header with authorization token.
{
"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
label*
string
Unique currency label.
Headers
Authorization*
string
Authorization header with authorization token.
{
"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
Authorization*
string
Authorization header with authorization token.
Request Body
(body)*
Currency
Model to create.
{
"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
label*
string
Unique currency label.
Headers
Authorization*
string
Authorization header with authorization token.
Request Body
(body)*
Currency
Model to create or update.
{
"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
label*
string
Unique currency label.
Headers
Authorization*
string
Authorization header with authorization token.
{
"IsDomestic": true,
"Label": "EUR",
"Sign": "β¬",
"ExchangeRate": 1,
"Description": "Euro",
"_v": 1
}Last updated
Was this helpful?