Creating a foreign exchange rate set

Foreign exchange rate sets include one or more foreign exchange rates.

Use the following endpoint to create a foreign exchange rate set:
  • POST /admin/v1/foreign-exchange-rate-sets
To create a foreign exchange rate set, the following values are required:
  • baseCurrency
  • effectiveDate
  • At least one rate in the foreignExchangeRates array that includes the priceCurrency code and the rate.
  • rateType

For example, the following creates a foreign exchange rate set:

Command
POST /admin/v1/foreign-exchange-rate-sets
Request payload
{
  "data": {
    "attributes": {
      "baseCurrency": {
        "code": "usd"
      },
      "effectiveDate": "2024-07-20",
      "expirationDate": "2024-07-27",
      "foreignExchangeRates": [
        {
          "priceCurrency": {
            "code": "eur"
          },
          "rate": "0.9382"
        },
        {
          "priceCurrency": {
            "code": "rub"
          },
          "rate": "91.902"
        },
        {
          "priceCurrency": {
            "code": "jpy"
          },
          "rate": "150.672"
        }
      ],
      "rateType": {
        "code": "corporate"
      }
    }
  }
}