API LibraryForex Rates
Fetch and Update Forex Exchange Rates
Fetches the latest forex exchange rates from upstream rate providers and updates the platform's internal rate cache. Returns the current rates after refresh.
When to Use
- Periodic rate refresh (typically called by an internal scheduler)
- Manual rate refresh when rates appear stale
- Before a batch of issuances to ensure fresh rates
Authorization
bearerAuth tenantId AuthorizationBearer <token>
In: header
X-TENANT-ID<token>
In: header
Header Parameters
X-TENANT-ID*string
Your unique tenant identifier
Request Body
application/json
productId*string
Product for which rates are refreshed
hierarchyId?string
Hierarchy/corporate ID
Response Body
application/json
application/json
curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/corporate/v1/forex/fetch-update-fx-rate" \ -H "X-TENANT-ID: ACME_CORP" \ -H "Content-Type: application/json" \ -d '{ "productId": "FRX001", "hierarchyId": "90009" }'{
"result": {
"rates": [
{
"currency": "USD",
"buyRate": 84.95,
"sellRate": 83.5
},
{
"currency": "EUR",
"buyRate": 92.1,
"sellRate": 90.8
},
{
"currency": "GBP",
"buyRate": 107.3,
"sellRate": 105.8
}
],
"lastUpdated": "2026-05-19T10:30:00Z"
},
"pagination": null
}{
"type": "https://www.m2pfintech.com/problem/problem-with-message",
"title": "Business validation failed",
"status": 409,
"detail": "Business validation failed",
"message": "error.business",
"businessCode": "PP_CORP_002"
}Filter Forex Issuances by Criteria POST
Advanced search for forex issuances using multiple filter criteria such as date range, status, hierarchy, product, and custom fields. Supports pagination.
Forex Operations Summary GET
Returns a dashboard summary of forex operations including total issuances, loads, and transaction volumes. Useful for operational reporting and management dashboards.
