Appearance
POST
/config/currency/currenciesRequired scope:
currency:createCreates a new currency and refreshes the exchange rate cache.
Request body ​
JSON
{
"currencyCode": "SEK",
"currencyName": "Swedish krona",
"numericCode": "752",
"symbol": "kr",
"roundingPrecision": 1,
"roundingDirection": 0,
"discountRoundingPrecision": 0.5,
"discountRoundingDirection": 0,
"active": true
}
Response ​
The currency was created successfully.
JSON
{
"currencyCode": "SEK"
}
| Error code | Description |
|---|---|
currency-code-invalid | The currency code must be exactly three letters. |
currency-code-is-unavailable | A currency with this code already exists. |
currency-discount-rounding-direction-invalid | The discount rounding direction must be 0 (down), 1 (nearest) or 2 (up). |
currency-discount-rounding-precision-invalid | The discount rounding precision must be at least 0 and below 10. |
currency-name-cannot-be-blank | The currency name cannot be a blank string. |
currency-name-is-unavailable | A currency with this name already exists. |
currency-name-too-long | The currency name cannot be longer than 30 characters. |
currency-numeric-code-too-long | The numeric code cannot be longer than 4 characters. |
currency-rounding-direction-invalid | The rounding direction must be 0 (down), 1 (nearest) or 2 (up). |
currency-rounding-precision-invalid | The rounding precision must be at least 0 and below 10. |
currency-symbol-too-long | The symbol cannot be longer than 30 characters. |