Skip to main content
POST
Create a single exchange rate
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /currencies/exchange-rates Validated via the shared validateExchangeRateInput helper: both currency codes must be valid ISO 4217 codes and differ from each other, rate must be a positive number, and period must be YYYYMM with a valid month. Authorization: admin or higher (requireAdmin).

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
base
string
required

ISO 4217 base currency code.

Example:

"EUR"

quoted
string
required

ISO 4217 quoted currency code.

Example:

"USD"

rate
number
required
Required range: x > 0
period
string
required

YYYYMM, month 01-12.

Pattern: ^\d{6}$
Example:

"202607"

source
string
default:manual
effectiveDate
string<date-time>
expiryDate
string<date-time>
isDefault
boolean
default:false
memo
string

Response

Exchange rate created

status
string
Example:

"success"

message
string
data
object

A stored exchange rate (ExchangeRate model).