Reporting API v2 - 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/listQuery 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 Partner Currency-Rates API
API Path:
~/api/v2/reporting/requesters/{requesterId}/partners/{partnerId}/currency-ratesSame 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).
Was this article helpful?
Articles in this section
- Reporting API v1 - overview
- Reporting API v2 - overview
- Reporting API v1/v2 - requesting access
- Reporting API v1 - data model
- Reporting API v1 - how to map your invoice data
- Reporting API v1 - detailed invoice line items
- Reporting API v2 - Invoice Taxes
- Reporting API v1 - how to identify organizations in your sales channel
- Reporting API v1 - currencies within the invoices
- Reporting API v1 - preview invoices in status 'New'
Add comment
Please sign in to leave a comment.