deleteCurrency
Requires permission platform:currency:manage.
Deletes a currency's master record. Currencies are shared by every organization, so this needs the platform permission to manage currencies, which only platform administrators hold. To stop using a currency in one organization, deactivate it instead.
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 DeleteCurrency($id: String!) {
deleteCurrency(id: $id) {
success
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation DeleteCurrency($id: String!) {\n deleteCurrency(id: $id) {\n success\n }\n}",
"variables": {
"id": "string"
}
}
EOF
Variables:
{
"id": "string"
}
Response:
{
"data": {
"deleteCurrency": {
"success": true
}
}
}
deleteCurrency(
id: String!
): BooleanResponse!
Arguments
deleteCurrency.id ● String! non-null scalar
The ID of the currency.
Type
BooleanResponse object
A yes or no outcome.