addCurrency
Requires at least one of the permissions settings:currency:create or settings:tenant:update.
Add additional currency for multi-currency support. Requires permission to create currencies or 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 AddCurrency($input: AddCurrencyInput!) {
addCurrency(input: $input)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation AddCurrency($input: AddCurrencyInput!) {\n addCurrency(input: $input)\n}",
"variables": {
"input": {
"currencyCode": "string",
"exchangeRate": 0
}
}
}
EOF
Variables:
{
"input": {
"currencyCode": "string",
"exchangeRate": 0
}
}
Response:
{
"data": {
"addCurrency": true
}
}
addCurrency(
input: AddCurrencyInput!
): Boolean!
Arguments
addCurrency.input ● AddCurrencyInput! non-null input
The details of the currency to add.
Type
Boolean scalar
The Boolean scalar type represents true or false.