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:

NOTE! Partners need to have the saskey in order to be able to execute the GET calls mentioned in this document. In case you do not have the saykey or an existing saskey is not working with new endpoints, reach out to our Support Team at support@appxite.com and will be happy to assist you.

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:

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

NOTE! API Purpose: for Distributors to be able to receive list of their Resellers who have configured Currency Rates by themselves.

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

Warning! ExchangeDateFrom and ExchangeDateTill max range period is 31 days, so that need to be considered when you are planning your API implementation.

 

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

 

Was this article helpful?

0 out of 0 found this helpful

Add comment

Please sign in to leave a comment.