deactivateCurrency
Requires at least one of the permissions settings:currency:update or settings:tenant:update.
Turns a currency off for the organization only. The base currency cannot be deactivated; set another as base first. Requires permission to update currency or 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 DeactivateCurrency($id: String!) {
deactivateCurrency(id: $id) {
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 DeactivateCurrency($id: String!) {\n deactivateCurrency(id: $id) {\n id\n code\n name\n type\n createdAt\n decimalPlaces\n }\n}",
"variables": {
"id": "string"
}
}
EOF
Variables:
{
"id": "string"
}
Response:
{
"data": {
"deactivateCurrency": {
"id": "id",
"code": "string",
"name": "string",
"type": "COMMODITY",
"createdAt": "2025-01-15T00:00:00Z",
"decimalPlaces": 0
}
}
}
deactivateCurrency(
id: String!
): Currency!
Arguments
deactivateCurrency.id ● String! non-null scalar
The ID of the currency.
Type
Currency object
A currency the organization can use.