Currencies define the monetary units used across the company and their exchange rates.
GraphQL
query {
Currency (id: 100012) {
label
exchange_rate
}
}
GraphQL
query {
Currencies {
data {
label
exchange_rate
active
}
}
}
id Unique identifier of the currency
label Name of the currency (USD, GBP, ...)
exchange_rate Currency exchange rate against default currency (1 for the default rate)
default If true, the rate is the default for the documents created
active If true, the rate is active and can be used in documents
You can create filters based on following fields
label Example:{ "column" : "LABEL", "operator" : "EQ", "value" : "EUR" }
exchange rate Example: { "column" : "EXCHANGE_RATE", "operator" : "GT", "value" : 1.1 }
default Example: { "column": "DEFAULT", "operator": "NEQ", "value": true }
active Example:{ "column": "ACTIVE", "operator": "EQ", "value": true }
You can sort data based on following fields : id, label, exchange_rate, default, active
GraphQL
query Currencies(
$where: QueryCurrenciesWhereWhereConditions,
) {
Currencies(
orderBy: [{column: LABEL, order: ASC}]
where: $where
) {
paginatorInfo {
total
}
data {
id
label
default
exchange_rate
}
}
}
Variables (JSON)
{
"where": {
"AND": [
{
"column": "ACTIVE",
"operator": "EQ",
"value": true
}
]
}
}
JSON
{
"data": {
"Currencies": {
"paginatorInfo": {
"total": 1
},
"data": [
{
"id": 100002,
"label": "EUR",
"default": true,
"exchange_rate": null
}
]
}
}
}