Update Exchange Rates
PUT /ws/rest/service/v1/exchange
Purpose
To add or modify currency rates of active exchange rates set.
Notes:
- When a request is made to this service, a new exchange rate is created (with currencies of currently active exchange rate set). The new exchange rate is activated immediately.
- If a currency object included in the request does not exist in the active exchange rate set, then this currency object will be added to the existing currency list.
- If currency object included in the request exists in the currently active exchange rate set, the currency rate will be updated with the value given in the request.
Request Format
Both input & output in JSON format in the body.
'currency_code' is required in the request.
Response Format
A JSON object is returned in the following format:
{
"data": [],
"message": [],
"status": <REST status code value>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Sample Request
This is an example of a request.
{
"data":[
{
"currencyid":2,
"rate":110.0,
"currency_name":"Afghani (AFN)",
"currency_code":"AFN"
},
{
"currencyid":3,
"rate":12.0,
"currency_name":"Lek (ALL)",
"currency_code":"ALL"
}
]
}
Sample Success Response
This is an example of a successful response with status code 200.
{
"data": [
{
"currencyid": 2,
"rate": 110.0,
"currency_name": "Afghani (AFN)",
"currency_code": "AFN"
},
{
"currencyid": 3,
"rate": 12.0,
"currency_name": "Lek (ALL)",
"currency_code": "ALL"
},
{
"currencyid": 40,
"rate": 134.0,
"currency_name": "Algeria Dinar (DZD)",
"currency_code": "DZD"
},
{
"currencyid": 12,
"rate": 211.0,
"currency_name": "Barbados Dollar (BBD)",
"currency_code": "BBD"
}
],
"message": [
"success"
],
"status": 200
}
Related Topics
Last Published Wednesday, April 9, 2025