Exchange rates

A custom exchange rate to convert one currency to another, if a company does not want to use the Intacct Daily Rate. An exchange rate contains an array of lines that each contain an effective start date, rate, and reciprocal rate to be used for transactions.

List exchange rates

get/objects/company-config/exchange-rate

Returns a collection with a key, ID, and link for each exchange rate. This operation is mostly for use in testing; use the query service to find objects that meet certain criteria and to specify properties that are returned.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "40",
      • "id": "40",
      • "href": "/objects/company-config/exchange-rate/40"
      },
    • {
      • "key": "41",
      • "id": "41",
      • "href": "/objects/company-config/exchange-rate/41"
      },
    • {
      • "key": "42",
      • "id": "42",
      • "href": "/objects/company-config/exchange-rate/42"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create an exchange rate

post/objects/company-config/exchange-rate

Creates a new exchange rate.

SecurityOAuth2
Request
Request Body schema: application/json
required

Exchange rate to create

fromCurrency
required
string

The transaction currency to convert from.

Example: "USD"
toCurrency
required
string

The transaction currency to convert to.

Example: "GBP"
required
object

Exchange rate type.

key
string

Unique key of an exchange rate type.

Example: "123"
id
string

Exchange rate type ID.

Example: "123"
Array of objects

Exchange rate lines in this exchange rate. Each line represents a rate and an effective starting date.

Array
effectiveStartDate
string <date>

The date the exchange rate becomes effective.

Example: "2021-01-31"
rate
number

The conversion rate.

Example: 2
reciprocalRate
number

The reverse of the conversion rate (rate). For example, if you are establishing a rate to convert dollars to Euros, the reciprocalRate is used to convert Euros to dollars.

Example: 0.5
object

Reference to the exchange rate that this line belongs to.

Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "exchangeRateType": {
    • "key": "4"
    },
  • "fromCurrency": "USD",
  • "toCurrency": "CAD",
  • "lines": [
    • {
      • "effectiveStartDate": "2023-08-15",
      • "rate": 2
      },
    • {
      • "effectiveStartDate": "2021-09-16",
      • "rate": 3,
      • "reciprocalRate": 0.55
      }
    ]
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "40",
    • "key": "40",
    • "href": "/objects/company-config/exchange-rate/40"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get an exchange rate

get/objects/company-config/exchange-rate/{key}

Returns detailed information for a specified exchange rate.

SecurityOAuth2
Request
path Parameters
key
required
string

Key for an exchange rate.

Example: 40
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "id": "40",
    • "key": "40",
    • "exchangeRateType": {
      • "key": "4",
      • "id": "4",
      • "name": "GBP-Rate",
      • "href": "/objects/company-config/exchange-rate-type/4"
      },
    • "fromCurrency": "USD",
    • "toCurrency": "CAD",
    • "audit": {
      • "createdDateTime": "2022-04-20T16:20:00Z",
      • "modifiedDateTime": "2022-04-20T16:20:00Z",
      • "createdByUser": {
        },
      • "createdBy": "1",
      • "modifiedByUser": {
        },
      • "modifiedBy": "95"
      },
    • "lines": [
      • {
        },
      • {
        }
      ],
    • "href": "/objects/company-config/exchange-rate/40"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update an exchange rate

patch/objects/company-config/exchange-rate/{key}

Updates an existing exchange rate by setting field values. Any fields not provided remain unchanged.

SecurityOAuth2
Request
path Parameters
key
required
string

Key for an exchange rate.

Example: 40
Request Body schema: application/json
fromCurrency
string

The transaction currency to convert from.

Example: "USD"
Array of objects

Exchange rate lines in this exchange rate. Each line represents a rate and an effective starting date.

Array
effectiveStartDate
string <date>

The date the exchange rate becomes effective.

Example: "2021-01-31"
rate
number

The conversion rate.

Example: 2
reciprocalRate
number

The reverse of the conversion rate (rate). For example, if you are establishing a rate to convert dollars to Euros, the reciprocalRate is used to convert Euros to dollars.

Example: 0.5
object

Reference to the exchange rate that this line belongs to.

Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "fromCurrency": "INR",
  • "lines": [
    • {
      • "key": "85",
      • "rate": 4,
      • "reciprocalRate": 2.5555
      },
    • {
      • "effectiveStartDate": "2023-11-18",
      • "rate": 5.5
      }
    ]
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "40",
    • "key": "40",
    • "href": "/objects/company-config/exchange-rate/40"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete an exchange rate

delete/objects/company-config/exchange-rate/{key}

Deletes an exchange rate.

SecurityOAuth2
Request
path Parameters
key
required
string

Key for an exchange rate.

Example: 40
Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}