setBaseCurrency
Requires permission settings:tenant:update.
Sets the organization's base currency. It is refused once the organization has posted transactions or an administrator has locked the base currency. Requires permission to update tenant settings.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SetBaseCurrency($currencyId: String!) {
setBaseCurrency(currencyId: $currencyId) {
id
code
name
type
createdAt
decimalPlaces
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetBaseCurrency($currencyId: String!) {\n setBaseCurrency(currencyId: $currencyId) {\n id\n code\n name\n type\n createdAt\n decimalPlaces\n }\n}",
"variables": {
"currencyId": "string"
}
}
EOF
Variables:
{
"currencyId": "string"
}
Response:
{
"data": {
"setBaseCurrency": {
"id": "id",
"code": "string",
"name": "string",
"type": "COMMODITY",
"createdAt": "2025-01-15T00:00:00Z",
"decimalPlaces": 0
}
}
}
setBaseCurrency(
currencyId: String!
): Currency!
Arguments
setBaseCurrency.currencyId ● String! non-null scalar
The ID of the currency to make the base currency.
Type
Currency object
A currency the organization can use.