POST
End an exchange rate
Organization space Accounting module Cannot be undone For: Accountant · Permission: exchange_rates.close Conditions
  • The accounting module must be included in the plan of the organization.
  • Exchange rates belong to the organization, not to a book.
  • The caller needs an accounting access grant on the organization’s own book (a grant on a company book is not enough). This is checked before validation.
  • A rate that is already closed cannot be closed again.
  • A rate that has not started yet (valid_from in the future) cannot be closed; delete it instead.
What else happens
  • Sets valid_to to today. The rate still applies today; from tomorrow no rate exists for that pair and direction until a new one starting after today is created, and conversions that need it are refused.
Part of Set up the books.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

exchangeRate
string
required

Identifier of the exchange rate (27-character KSUID).

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, source_currency_code, source_currency_exponent, target_currency_code, target_currency_exponent, direction, rate, valid_from, valid_to, created_by, created_by_type, created_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .

Response

Resource (only with response=resource).

id

Identifier of the exchange rate (27-character KSUID).

source_currency_code

Three-letter code of the currency converted from.

source_currency_exponent
integer

Number of decimal places of the source currency (divide an amount in minor units by 10 to this power).

target_currency_code

Three-letter code of the currency converted to.

target_currency_exponent
integer

Number of decimal places of the target currency.

direction

Money flow the rate applies to: incoming (money received) or outgoing (money paid out, such as refunds).

rate

Exchange rate: how many units of the target currency one unit of the source currency is worth, as an exact decimal string with no trailing zeros.

valid_from

First day the rate applies (YYYY-MM-DD).

valid_to

Last day the rate applies (YYYY-MM-DD); null while the rate is open-ended.

created_by

Identifier of the member or agent account that created the rate; null when it could not be identified.

created_by_type

Type of the creator (member or agent account); null when unknown.

created_at

Date and time the record was created (ISO 8601, UTC).