Retrieve Currencies via HTTP
Currency is the unit object used by the Currency Amount data type. To retrieve all active currencies that exist on the platform, invoke the following operation:
https://<host>/<instance>/metadata/currencies
Response Example
The operation retrieves a JSON Map of all currencies, indexed by their UUIDs. For each currency, the following information is retrieved:
Symbol
Symbol position
Precision
Name
Active flat
Alphabetic code
UUID
{
"62d0f860-bc48-11e0-bdec-001ec950a80f": {
"symbol": "$",
"symbolPosition": "before_amount",
"precision": "2",
"name": "Argentine peso",
"active": true,
"alphabeticCode": "ARS",
"uuid": "62d0f860-bc48-11e0-bdec-001ec950a80f"
},
"62e40b3a-bc48-11e0-be38-001ec950a80f": {
"symbol": "€",
"symbolPosition": "before_amount",
"precision": "2",
"name": "Euro",
"active": true,
"alphabeticCode": "EUR",
"uuid": "62e40b3a-bc48-11e0-be38-001ec950a80f"
},
"6313ba56-bc48-11e0-beec-001ec950a80f": {
"symbol": "$",
"symbolPosition": "before_amount",
"precision": "2",
"name": "United States dollar",
"active": true,
" alphabeticCode": "USD",
"uuid": "6313ba56-bc48-11e0-beec-001ec950a80f"
},....
}
Currency Translation
You can also specify the language parameter to retrieve translated currencies, for example:
GET https://<host>/<instance>/metadata/currencies?language=es
Response Example
The same information as for nontranslated currency is retrieved, with currency names translated to the specified language, for example, Spanish:
{
"62d0f860-bc48-11e0-bdec-001ec950a80f": {
"symbol": "$",
"symbolPosition": "before_amount",
"precision": "2",
"name": "Peso argentino", <-- translated name
"active": true,
"alphabeticCode": "ARS",
"uuid": "62d0f860-bc48-11e0-bdec-001ec950a80f"
},
"62e40b3a-bc48-11e0-be38-001ec950a80f": {
"symbol": "€",
"symbolPosition": "before_amount",
"precision": "2",
"name": "Euro", <-- translated name
"active": true,
"alphabeticCode": "EUR",
"uuid": "62e40b3a-bc48-11e0-be38-001ec950a80f"
},
"6313ba56-bc48-11e0-beec-001ec950a80f": {
"symbol": "$",
"symbolPosition": "before_amount",
"precision": "2",
"name": "Dolar estadounidense", <-- translated name
"active": true,
" alphabeticCode": "USD",
"uuid": "6313ba56-bc48-11e0-beec-001ec950a80f"
},....
}
For more information:
Was this helpful?