Reporting API - Currency Exchange Rates
Introduction
Appxite exposed new set of APIs for partners in order to be able to receive their own configurated rates together with generic rates (daily synced by AppXite from https://currencylayer.com and applied to all platforms who don't own their specific configuration).
The former endpoint will be shortly deprecated as a result of a new functionality being introduced:
/api/v1/reporting/currency-rates/{requesterId}
To view detailed documentation on the available new set of endpoints, please visit the Postman collection here: Postman Collection v2
In this article:
- Requester Currency-Rates API
- Requester Partners Currency-Rates Summary API
- Requester Partner Currency-Rates API
Requester Currency-Rates API
API Path:
~/api/v2/reporting/requesters/{requesterId}/currency-rates
Query Parameters:
exchangeDateFrom (mandatory)
exchangeDateTill (mandatory)
fromCurrency(optional)
toCurrency(optional)
level(none, generic, organization) (Default: none)
- Rates are returned from ExchangeDate where ExchangeDate >= ExchangeDateFrom <= and ExchangeDate <=ExchangeDateTill
- in case fromCurrency and toCurrency is specified then rates filtered based on currency Codes, otherwise all are returned
- level:
- generic - exchange rates which are Daily Synced by AppXite from https://currencylayer.com which is Default provider source (more details: Currency exchange (FX) rate management)
- organization - custom rates specific to the organization which matches requesterId
- none - both generic and organization
Response:
[{
"id": "guid",
"from": "string",
"to": "string",
"source":{"ECB","CurrencyLayer","Custom"},
"baseRate": decimal,
"surcharge": decimal,
"finalRate":decimal,
"exchangeDate": "date:yyyy-MM-dd",
"level": {"Generic","Organization"}
}]
- id - Appxite internal currency Id
- source is set based on Exchange Provider selection, either:
- ECB - European Central Bank
- CurrencyLayer
- Custom
- baseRate is base rate
- surcharge is margin %
- finalRate is (baseRate + surcharge%)
Requester Partners Currency-Rates Summary API
API Path:
~/api/v2/reporting/requesters/{requesterId}/currency-rates/partners/list
Query Parameters: nil
Response:
[
{"partnerId":"guid"}
]
Returns the list of child resellerId's who have exchange rates configured on their respective portals and that resellerId cen be used as partnerId in the API call mentioned in below section.
Requester Parter Currency-Rates API
API Path:
~/api/v2/reporting/requesters/{requesterId}/partners/{partnerId}/currency-rates
Same query parameters and response apply as per Requester Currency-Rates API within a scope of the resellers but only if that reseller belongs to distributor as defined by requesterId value.
Limitations
Conclusion
The article guides the users how to get the custom exchange rates injected into Appxite via UI or API methods and or alternatively how to get the general exchange rates used by Appxite obtained from external sources in case Partners did not configure their own custom exchange rates.
For Distributors there are additional APIs introduced in order to receive Resellers settings who have done their own Rate Configurations in their Platforms, so Distributors can carry out additional validation (invoice transformation in Distributor system or other needed business activities).
Related Content
- Reporting API - Overview
- Currency exchange (FX) rate management
- How to select custom provider as FX rate source?
- Currency Layer Website
Was this article helpful?
Articles in this section
- Reporting API - Overview
- Reporting API - Requesting Access
- Reporting API - Data Model
- Reporting API - How to map your Invoice Data
- Reporting API - Detailed Invoice Line Items
- Reporting API - How to identify Organizations in your Sales Channel
- Reporting API - Currencies within the Invoices
- Reporting API : Preview invoices in status 'New'
- Reporting API - Using updatedDate Filters
- Reporting API - Viewing Vendor Invoice Row JSONs via API
Add comment
Please sign in to leave a comment.