Skip to main content

Currency Rate API

Manage exchange rates between currencies. Currency rates define the conversion rates between different currencies over time.

Endpoints

MethodEndpointDescription
GET/record/v1/currencyRateList all currency rates
GET/record/v1/currencyRate/{id}Get a specific currency rate by ID
POST/record/v1/currencyRateCreate a new currency rate
PATCH/record/v1/currencyRate/{id}Update an existing currency rate
DELETE/record/v1/currencyRate/{id}Delete a currency rate

Key Fields

Required Fields

FieldTypeDescriptionRequired
baseCurrencyObjectThe base currency for the exchange rateYes
transactionCurrencyObjectThe transaction currency to convert from/toYes
exchangeRateNumberThe exchange rate (e.g., 1.18 means 1 base = 1.18 transaction)Yes
effectiveDateDateDate when this rate becomes effective (YYYY-MM-DD)Yes

Optional Fields

FieldTypeDescriptionRequired
currentRateBooleanWhether this is the current rate for this currency pairNo

Example: Create Currency Rate

Request

POST /record/v1/currencyRate
Content-Type: application/json
{
"baseCurrency": {
"id": "1"
},
"transactionCurrency": {
"id": "2"
},
"exchangeRate": 1.18,
"effectiveDate": "2025-12-25",
"currentRate": true
}

Response

{
"id": "789",
"baseCurrency": {
"id": "1",
"refName": "USA"
},
"transactionCurrency": {
"id": "2",
"refName": "Euro"
},
"exchangeRate": 1.18,
"effectiveDate": "2025-12-25",
"currentRate": true,
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/currencyRate/789"
}
]
}

Example: Update Currency Rate

Request

PATCH /record/v1/currencyRate/789
Content-Type: application/json
{
"exchangeRate": 1.20,
"currentRate": true
}

Response

{
"id": "789",
"baseCurrency": {
"id": "1",
"refName": "USA"
},
"transactionCurrency": {
"id": "2",
"refName": "Euro"
},
"exchangeRate": 1.20,
"effectiveDate": "2025-12-25",
"currentRate": true,
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/currencyRate/789"
}
]
}

Query Filters

You can filter currency rates using query parameters:

Filter by Base Currency

GET /record/v1/currencyRate?q=baseCurrency.id IS 1

Filter by Transaction Currency

GET /record/v1/currencyRate?q=transactionCurrency.id IS 2

Filter by Effective Date

GET /record/v1/currencyRate?q=effectiveDate ONORAFTER 2025-01-01

Filter by Current Rate

GET /record/v1/currencyRate?q=currentRate IS true

Filter by Currency Pair

GET /record/v1/currencyRate?q=baseCurrency.id IS 1 AND transactionCurrency.id IS 2

Get Latest Rate for Currency Pair

GET /record/v1/currencyRate?q=baseCurrency.id IS 1 AND transactionCurrency.id IS 2 AND currentRate IS true

Complex Filter Example

GET /record/v1/currencyRate?q=baseCurrency.id IS 1 AND effectiveDate ONORAFTER 2025-01-01&orderby=effectiveDate DESC

Pagination and Sorting

GET /record/v1/currencyRate?limit=100&offset=0&orderby=effectiveDate DESC

Important Notes

  1. Exchange Rate Direction: The exchange rate represents how much of the transaction currency equals one unit of the base currency. For example, if USD is base and EUR is transaction, a rate of 0.85 means 1 USD = 0.85 EUR.

  2. Effective Date: Currency rates are date-effective. NetSuite uses the rate with the effective date closest to (but not after) the transaction date.

  3. Current Rate: The currentRate flag indicates which rate is currently active for a currency pair. Only one rate per currency pair should have this flag set to true at a time.

  4. Automatic Updates: When creating a new rate with a more recent effective date, you may want to update the previous rate's currentRate flag to false.

  5. Historical Rates: Keep historical rates in the system for accurate reporting and revaluation of past transactions.

  6. Base Currency: All rates are relative to your base currency. If you need to convert between two non-base currencies, NetSuite will use both rates to calculate the conversion.

  7. Rate Precision: Exchange rates typically use 4-6 decimal places for accuracy. NetSuite supports high precision for exchange rates.

  8. Deletion Restrictions: Currency rates that have been used in transactions should not be deleted to maintain historical accuracy.

  9. Permissions: Requires "Lists > Currency" permission in NetSuite.

  10. Consolidation: In OneWorld accounts with multiple subsidiaries using different currencies, maintaining accurate exchange rates is critical for consolidated reporting.

  11. Rate Sources: Many organizations automate currency rate updates by pulling from external sources (central banks, financial services) via scheduled scripts.

  12. Revaluation: Currency rates are used in unrealized gain/loss calculations for foreign currency accounts and open transactions.