Exchange rate history
GET
/v2/company-currency-rates
const url = 'https://api-admin.billz.ai/v2/company-currency-rates?page=1&limit=5&start_date=2020-01-01&end_date=2024-07-26';const options = { method: 'GET', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api-admin.billz.ai/v2/company-currency-rates?page=1&limit=5&start_date=2020-01-01&end_date=2024-07-26' \ --header 'Authorization: Bearer <token>' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”page
integer format: int32
Not a number -> 400 ‘error while parsing page’
Example
1limit
integer format: int32
Not a number -> 400 (same message — ‘error while parsing page’)
Example
5currency
string
Currency code (USD, UZS, EUR). Empty string = no filter
start_date
string
Exchange rate start date, format YYYY-MM-DD
Example
2020-01-01end_date
string
End date, format YYYY-MM-DD
Example
2024-07-26Header Parameters
Section titled “Header Parameters”platform-id
string
Platform identifier. A static value is used for integrations.
Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
rates
If there are no exchange rates — 200 with an empty or null value
Array<object>
object
id
string
source_currency
USD, UZS, EUR
string
target_currency
May be an empty string for historical records
string
rate
number format: double
valid_from
Format ‘YYYY-MM-DD HH:MM:SS’
string
valid_to
Empty string = the exchange rate is still in effect
string
count
Total number of records
integer format: int32
Examplegenerated
{ "rates": [ { "id": "example", "source_currency": "example", "target_currency": "example", "rate": 1, "valid_from": "example", "valid_to": "example" } ], "count": 1}