Kantata Kantata OX Knowledge Base Release Notes Status Page

Exchange Tables

This object allows you to view or edit foreign currency exchange rates, depending on your Foreign Exchange Access Group Set permissions. If you are not a member of an Access Group with Foreign Exchange (FX) permissions, an account administrator will need to add you to one. If you are an account admin that needs FX permissions, you can add yourself to an Access Group with the FX permissions you require.

Fetching a list of Exchange Tables

Returns a list of exchange tables associated with your account, and their default settings details.

Responses
200

A list of objects have been retrieved.

Response Schema: application/json
count
integer <int32>

Number of exchange tables in the response.

object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/foreign_exchange/exchange_tables
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "exchange_tables": {
    }
}

Creating a new Exchange Table

Creates a new exchange table.

Request
query Parameters
name
required
string

Give a name for your new exchange table.

account_default
boolean

If true, sets the exchange table to be the default for currency conversions across your entire account. This includes currency conversions in Insights reports, unless you set a different table as the insights_account_default.

insights_account_default
boolean

If true, sets the exchange table to be the default for currency conversions in Insights reports. The insights_account_default exchange table must have 400 or fewer currency pairs in order for exchange rates information to display in Insights reports.

Responses
200

object has been created.

Response Schema: application/json
count
integer <int32>

Number of exchange tables in the response.

object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/foreign_exchange/exchange_tables
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "exchange_tables": {
    }
}

Fetching a single Exchange Table

Returns default settings details for a specified exchange table.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
200

The object has been retrieved.

Response Schema: application/json
object
id
string

The ID of the exchange table.

name
string

The name of the exchange table.

account_default
boolean

If true, this is set as the default exchange table for currency conversions across your entire account.

insights_account_default
boolean

If true, this is set as the default exchange table for currency conversions in Insights reports.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/foreign_exchange/exchange_tables/{id}
Request samples
Response samples
application/json
{
  • "id": {
    }
}

Updating an existing Exchange Table

Updates the name and/or default settings for a specified exchange table.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
account_default
boolean

If true, sets the exchange table to be the default for currency conversions across your entire account. This includes currency conversions in Insights reports, unless you set a different table as the insights_account_default.

insights_account_default
boolean

If true, sets the exchange table to be the default for currency conversions in Insights reports. The insights_account_default exchange table must have 400 or fewer currency pairs in order for exchange rates information to display in Insights reports.

name
string

Update the name of the exchange table.

Responses
200

object has been updated.

Response Schema: application/json
count
integer <int32>

Number of exchange tables in the response.

object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/foreign_exchange/exchange_tables/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "exchange_tables": {
    }
}

Import Exchange Rates

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

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
csv_file
required
string

A .csv file with headers Source Currency, Target Currency, Exchange Rate, and Effective Date. For more details on how to format your .csv file, please see this KB article.

Request Body schema: application/json
Array of objects

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.

Array
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.

Responses
200

object has been created.

Response Schema: application/json
count
integer <int32>

Number of exchange tables in the response.

object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/foreign_exchange/exchange_tables/{id}/rates
Request samples
application/json
{
  • "exchange_rates": [
    ]
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "exchange_rates": {
    }
}

Fetching a list of Exchange Rates

Returns all current exchange rates for a specified exchange table, unless filter parameters have been applied..

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
date
string <date>

Filter for rates by the date the exchange rate takes effect.

page
integer <int32>
per_page
integer <int32>
source_currency
string

Filter for rates with the specified source currency (in ISO code format). The source currency is the currency you are converting from.

target_currency
string

Filter for rates with the specified target currency (in ISO code format). The target currency is the currency you are converting to.

Responses
200

A list of objects have been retrieved.

Response Schema: application/json
count
integer <int32>

Number of exchange tables in the response.

object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/foreign_exchange/exchange_tables/{id}/rates
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "exchange_rates": {
    }
}