APG PayAPG Paydocs

FX rates

Create FX rate sets

POST/fx-rate-sets

Create a rate set with an initial set of rates. The response carries the identifier you address it by.

Permissions

Required permission
fxRates:create

Requires the `create` action on `fxRates` for the supplied runtime context

Request body

This body is a tagged shape: type is always "FxrsCmdCreate". Send it; more variants can be added, and a caller that switches on it keeps working when they are.

Discriminated by type
type = "FxrsCmdCreate"
rateSetCodestringrequired

The code this set will be known by. Unchangeable, and the only way to address it afterwards.

Example 0.9412

enterpriseIdEntIdrequired

Identifier of an enterprise.

Example ent_9f2Kd8QpLzXw

descriptionstringrequired
crossCurrencyIsoCurrencyrequired

The currency every rate is quoted through.

AFNDZDARSAMDAWGAUDAZNBSDBHDTHB
+156 more

PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN

timeZonestringrequired

The time zone the set's business day is reckoned in, Australia/Sydney.

ratesUpdatedAtstring (date-time)

When the rates were struck. Defaults to now; supply it when loading rates from earlier.

Example 2026-08-19T04:21:07Z

curl -X POST https://api.tst.au.apgpay.dev/fx-rate-sets \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "FxrsCmdCreate",
  "rateSetCode": "0.9412",
  "enterpriseId": "ent_9f2Kd8QpLzXw",
  "description": "string",
  "crossCurrency": "AUD",
  "timeZone": "string",
  "ratesUpdatedAt": "2026-08-19T04:21:07Z",
  "rates": [
    {
      "type": "FxrsRateAttributes",
      "baseCurrency": "AUD",
      "termCurrency": "AUD",
      "bidRate": "0.9412",
      "askRate": "0.9412"
    }
  ]
}'

Responses

The response is a tagged shape: type is always "FxrsCreateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "FxrsCreateRspAttributes"

The resource that was created.

Example
{
  "type": "FxrsCreateRspAttributes",
  "created": {
    "type": "FxrsViewAttributes",
    "fxRateSetId": "fxrset_9f2Kd8QpLzXw",
    "rateSetCode": "0.9412",
    "enterpriseId": "ent_9f2Kd8QpLzXw",
    "description": "string",
    "crossCurrency": "AUD",
    "timeZone": "string",
    "rates": {
      "type": "FxrsSnapshotAttributes",
      "ratesUpdatedAt": "2026-08-19T04:21:07Z",
      "recordedAt": "2026-08-19T04:21:07Z",
      "rates": [
        {
          "type": "FxrsRateAttributes",
          "baseCurrency": "AUD",
          "termCurrency": "AUD",
          "bidRate": "0.9412",
          "askRate": "0.9412"
        }
      ]
    },
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses