Page tree
Skip to end of metadata
Go to start of metadata

To edit details of a currency, use the following request:

PUT /settings/currencies/:id.xml
PUT /settings/currencies/:id.json

XML Request example

*curl -i -X PUT -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<currency><name>British_changed</name><unit>§</unit><format>%n%u</format><separator>.</separator><precision>2</precision><precision_for_unit>4</precision_for_unit><delimiter>,</delimiter></currency>' --url http://onapp.test/settings/currencies/:id.xml* 

JSON Request example

*curl -i -X PUT -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"currency":{"name":"British_changed","unit":"§","format":"%n%u","separator":".","precision":"4", "precision_for_unit":"4","delimiter":","}}' --url http://onapp.test/settings/currencies/:id.json* 


name – the currency label

unit – a currency symbol ($, €, £, etc. )

format - how the currency is displayed in the control panel. The following parameters are used: %n ( for the digits), %u ( for the currency symbol)

code - three-character currency code that is generally used to represent the currency

separator - a character used to format decimal numbers, e.g 100.99

precision - the number of digits after the delimiter to display the costs

precision_for_unit – the number of digits after the delimiter to display the prices for resources

delimiter - a grouping character used to separate thousands, e.g: 100,000,000.

  • Be aware, that it is prohibited to set the delimiter and separator which are identical.
  • The precision cannot exceed 8 symbols.
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels