---
title: "Import Exchange Rates"
method: POST
path: "/foreign_exchange/exchange_tables/{id}/rates"
tags: ["Exchange Tables"]
---

# Import Exchange Rates

`POST /foreign_exchange/exchange_tables/{id}/rates`

## Request

- Base URL: `https://api.mavenlink.com/api/v1`
- URL: `https://api.mavenlink.com/api/v1/foreign_exchange/exchange_tables/{id}/rates`
- Auth: none declared

Add or update exchange rates for a specified exchange table by importing rates as a .csv file, or in a JSON array of hashes.

## Path parameters

- `id` integer, required

## Query parameters

- `csv_file` string, required

## Request body

- object
  - `exchange_rates` object[]: An array of hashes represents an entire exchange rate table, while each hash represents a row in the table. Each row (hash) contains four (4) fields that make up a currency conversion, organized by columns in a table. These fields are source currency, target currency, effective date, and exchange rate of each currency conversion. Add hashes to define a new currency exchange, or modify the fields of existing hashes to update those currency conversions.
    - `source_currency` string: The currency you are converting from.
    - `target_currency` string: The currency you are converting to.
    - `effective_date` string, date: The date the exchange rate takes effect. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.
    - `exchange_rate` string: The rate of the exchange from source to target currency. For example, a rate of 1.53 for a USD (source) to AUD (target) conversion would mean 1USD = 1.53AUD.

## Response `200`

Exchange Table has been created.

- object
  - `count` integer: Number of exchange tables in the response.
  - `meta` object
    - `count` integer: Number of exchange tables in the response.
    - `page_count` integer: Number of pagination pages available.
    - `page_number` integer: Current pagination page.
    - `page_size` integer: Number of elements in a pagination page.
  - `results` object[]
    - `key` string
    - `id` string: The ID of the exchange table.
  - `exchange_rates` object
    - `id` object
      - `id` integer: The ID of the exchange rate.
      - `exchange_table_id` integer: The ID of the exchange table.
      - `source_currency` string: The currency you are converting from.
      - `target_currency` string: The currency you are converting to.
      - `effective_date` string, date: The date the exchange rate takes effect.
      - `rate` string: The rate of the exchange from source to target currency. For example, a rate of 1.53 for a USD (source) to AUD (target) conversion would mean 1USD = 1.53AUD.
      - `source_currency_symbol` string: The symbol for the source currency.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized request
- `403`: Forbidden request
- `404`: Page Not Found
- `422`: Unprocessable Entity
- `503`: Service is unavailable

---

[API](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation.md) - [All operations](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation/revisions/9d4ebed2fa98?raw)
