POSTing multicurrency information

Whenever you POST a reserve or check, you must specify currency information. For a single-currency instance of ClaimCenter, all specified currencies must be the same. When multicurrency is enabled, the specified currencies can be different.

When a request payload contains multiple currency values, the specified currencies must meet any relevant validation criteria. For example, when creating a reserve, the claim currency does not need to match the reserve currency. But, the currency for each reserve line item must match the reserve currency. If these types of validation criteria are not met, Cloud API returns an error.

POSTing a reserve with multiple currencies

The following is an example of a request payload for a new reserve for claim cc:202. Although it is not evident from the payload, the claim currency for cc:202 is US Dollars (usd).

  • The reserving currency is Euros (eur).
  • The reserve transaction currency is Japanese yen (jpy).
POST http://localhost:8080/cc/rest/claim/v1/claims/cc:202/reserve-sets

{
  "data": {
    "attributes": {
      "reservesToWrite": [
        {
          "reserveLine": {
            "costCategory": {
              "code": "body"
            },
            "costType": {
              "code": "claimcost"
            },
            "exposure": {
              "id": "cc:SfXS3Pey0Al29PI13KC5C"
            },
            "reservingCurrency": {
              "code": "eur"
            }
          },
          "lineItems": [
            {
              "transactionAmount": {
                "amount": "100.00",
                "currency": "jpy"
              }
            }
          ],
          "currency": {
            "code": "jpy"
          }
        }
      ]
    }
  }
}

POSTing a reserve with a custom exchange rate

To specify a custom exchange rate, use the transToReservingExchangeRate object. This specifies the rate to use when converting the transaction currency into the reserving currency. The object takes three fields:

  • An optional description string value.
  • A Boolean market value. (This identifies whether ClaimCenter uses the market rate populated by the ExchangeRateSetPlugin for this transaction or uses a new custom rate. If a custom exchange rate is being specified, set market to false.)
  • A decimal rate value.

The following is an example of a request payload for a new reserve for claim cc:202. Although it is not evident from the payload, the claim currency for cc:202 is US dollars (usd).

  • The reserving currency is US dollars (usd).
  • The reserve transaction currency is Canadian dollars (cad).
  • The custom exchange rate is 4.0 (The transaction amount is 300. Thus, this will be recorded as $300 CAD, which is equal to $1200 USD.)
POST http://localhost:8080/cc/rest/claim/v1/claims/cc:202/reserve-sets

{
  "data": {
    "attributes": {
      "reservesToWrite": [
        {
          "transToReservingExchangeRate": {
            "description": "Custom exchange rate",
            "market": false,
            "rate": "4.0"
          },
          "reserveLine": {
            "costCategory": {
              "code": "body"
            },
            "costType": {
              "code": "claimcost"
            },
            "exposure": {
              "id": "cc:SfXS3Pey0Al29PI13KC5C"
            },
            "reservingCurrency": {
              "code": "usd"
            }
          },
          "lineItems": [
            {
              "transactionAmount": {
                "amount": "300.00",
                "currency": "cad"
              }
            }
          ],
          "currency": {
            "code": "cad"
          }
        }
      ]
    }
  }
}

POSTing a check set with multiple currencies

The following is an example of a check set payload for a new check set for claim cc:202. Although it is not evident from the payload, the claim currency for cc:202 is usd.

  • The reserving currency is British pounds (gbp).
  • The currency for the check (and any associated payment transaction) is Canadian dollars (cad).
POST http://localhost:8080/cc/rest/claim/v1/claims/cc:202/check-sets

{
  "data": {
    "attributes": {
      "primaryCheckToWrite": {
        "paymentsToWrite": [
          {
            "lineItems": [
              {
                "transactionAmount": {
                  "amount": "75.00",
                  "currency": "cad"
                }
              }
            ],
            "paymentType": {
              "code": "final"
            },
            "reserveLine": {
              "costCategory": {
                "code": "body"
              },
              "costType": {
                "code": "claimcost"
              },
              "exposure": {
                  "id": "cc:SfXS3Pey0Al29PI13KC5C"
              },
              "reservingCurrency": {
                "code": "gbp"
              }
            },
            "currency": {
              "code": "cad"
            }
          }
        ],
        "payees": [
          {
            "contact": {
              "id": "cc:Sr-RcOtnyAd2_TsoU4Szy"
            },
            "payeeType": {
              "code": "insured"
            }
          }
        ],
        "paymentMethod": {
          "code": "eft"
        }
      }
    }
  }
}

POSTing a check set with a custom exchange rate

To specify a custom exchange rate, use the transToReservingExchangeRate object. This specifies the rate to use when converting the transaction currency into the reserving currency. The object takes three fields:

  • An optional description string value.
  • A Boolean market value. (This identifies whether ClaimCenter uses the market rate populated by the ExchangeRateSetPlugin for this transaction or uses a new custom rate. If a custom exchange rate is being specified, set market to false.)
  • A decimal rate value.

The following is an example of a request payload for a new reserve for claim cc:202. Although it is not evident from the payload, the claim currency for cc:202 is US Dollars (usd).

  • The reserving currency is British pounds (gbp).
  • The currency for the check (and any associated payment transaction) is Canadian dollars (cad).
  • The custom exchange rate is 0.5 (The transaction amount is 50. Thus, this will be recorded as $50 CAD, which is equal to $25 GPB.)
POST http://localhost:8080/cc/rest/claim/v1/claims/cc:202/reserve-sets

{
  "data": {
    "attributes": {
      "primaryCheckToWrite": {
        "paymentsToWrite": [
          {
            "lineItems": [
              {
                "transactionAmount": {
                  "amount": "50.00",
                  "currency": "cad"
                }
              }
            ],
            "paymentType": {
              "code": "partial"
            },
            "reserveLine": {
              "costCategory": {
                "code": "body"
              },
              "costType": {
                "code": "claimcost"
              },
              "exposure": {
                  "id": "cc:SfXS3Pey0Al29PI13KC5C"
              },
              "reservingCurrency": {
                "code": "gbp"
              }             
            },
            "currency": {
              "code": "cad"
            },
            "transToReservingExchangeRate": {
              "description": "Custom exchange rate",
              "market": false,
              "rate": "0.5"
            }             
          }
        ],
        "payees": [
          {
            "contact": {
              "id": "cc:Sr-RcOtnyAd2_TsoU4Szy"
            },
            "payeeType": {
              "code": "insured"
            }
          }
        ],
        "paymentMethod": {
          "code": "eft"
        }
      }
    }
  }
}

Additional exchange rate schema fields

Response payloads can also include the following exchange rate fields:

  • claimToReportingExchangeRate
  • transToClaimExchangeRate

Note that these fields are read-only. When POSTing reserves and check sets, custom exchange rates are always specified using the transToReservingExchangeRate field.