The Update currency rates method is used to update exchange currency rates for the current reseller or any of its downstream resellers:
-
For the list of available currencies, see Get list of currency rates.
-
You can update several currency rates at once.
-
If the same currency pair is specified several times in a request, the currency rate is updated sequentially several times.
XML
PATCH {base_url}/api/v3/resellers/{reseller_id}/currency_rates
Arguments
Response model
Request example
PATCH /api/v3/resellers/1/currency_rates
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetest3gJXZH5uHCw
Accept: application/vnd.api+json
{
"data": {
"attributes": [
{
"base_currency": "USD",
"foreign_currency": "EUR",
"quantity": 1,
"rate": 1.2200,
"adjustment": 1.2000,
"show_for_client": true
},
{
"base_currency": "USD",
"foreign_currency": "MYR",
"quantity": 100,
"rate": 1.43,
"adjustment": 1.1100,
"show_for_client": true
}
]
}
}
Response example
JSON
{
"data": [
{
"id": "606",
"type": "currency_rates",
"attributes": {
"created_at": "2024-10-04T16:23:46.198+03:00",
"updated_at": "2024-10-04T16:23:46.198+03:00",
"from_id": 2,
"to_id": 1,
"rate": "1.22",
"quantity": 1,
"current": true,
"reseller_id": 1,
"show_for_client": true,
"adjustment": "1.2"
}
},
{
"id": "607",
"type": "currency_rates",
"attributes": {
"created_at": "2024-10-04T16:23:46.235+03:00",
"updated_at": "2024-10-04T16:23:46.235+03:00",
"from_id": 4,
"to_id": 1,
"rate": "1.43",
"quantity": 100,
"current": true,
"reseller_id": 1,
"show_for_client": true,
"adjustment": "1.11"
}
}
]
}